~sircmpwn/gmni-devel

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH gmni v2] gmnlm: don't assume everything starting with b/f is b/f command

Ondřej Fiala <temp.xanomes@volny.cz>
Details
Message ID
<20220701035100.26448-1-temp.xanomes@volny.cz>
DKIM signature
missing
Download raw message
Patch: +8 -2
It was impossible to enter a file:// URL because it got interpreted
as a 'f' command without any warning about invalid argument. The same
thing happened with relative addresses beginning with 'b' or 'f'.
---
Forgot to check for one case.

 src/gmnlm.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/gmnlm.c b/src/gmnlm.c
index 9e7b527..e539361 100644
--- a/src/gmnlm.c
+++ b/src/gmnlm.c
@@ -569,8 +569,11 @@ do_prompts(const char *prompt, struct browser *browser)
		result = PROMPT_QUIT;
		goto exit;
	case 'b':
		if (in[1]) {
		if (in[1] && isdigit(in[1])) {
			historyhops =(int)strtol(in+1, &endptr, 10);
			if (endptr[0]) break;
		} else if (in[1]) {
			break;
		}
		while (historyhops > 0) {
			if (browser->history->prev) {
@@ -582,8 +585,11 @@ do_prompts(const char *prompt, struct browser *browser)
		result = PROMPT_ANSWERED;
		goto exit;
	case 'f':
		if (in[1]) {
		if (in[1] && isdigit(in[1])) {
			historyhops =(int)strtol(in+1, &endptr, 10);
			if (endptr[0]) break;
		} else if (in[1]) {
			break;
		}
		while (historyhops > 0) {
			if (browser->history->next) {
-- 
2.36.1
Details
Message ID
<CL44YC8XIKPE.3JCHJJ9A9NTNK@taiga>
In-Reply-To
<20220701035100.26448-1-temp.xanomes@volny.cz> (view parent)
DKIM signature
missing
Download raw message
Thanks!

To git@git.sr.ht:~sircmpwn/gmni
   bf7975d..861d2e2  master -> master
Reply to thread Export thread (mbox)