From a56af59f4095df4d5657b62750e704ebea52daca Mon Sep 17 00:00:00 2001
From: Oliver Schmidt
Date: Sun, 24 May 2015 15:45:45 +0200
Subject: [PATCH] Avoid randomly "eating" blanks.
At the time do_word() is called s.word[s.wordlen] is undefined. So it doesn't make sense to make decisions based on its value - and in fact I don't see why it was necessary/desirable in the first place.
---
apps/webbrowser/htmlparser.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/apps/webbrowser/htmlparser.c b/apps/webbrowser/htmlparser.c
index 725aae433..f955b2f3d 100644
--- a/apps/webbrowser/htmlparser.c
+++ b/apps/webbrowser/htmlparser.c
@@ -305,9 +305,7 @@ do_word(void)
{
if(s.wordlen > 0) {
if(s.majorstate == MAJORSTATE_LINK) {
- if(s.word[s.wordlen] != ISO_space) {
- add_char(ISO_space);
- }
+ add_char(ISO_space);
} else if(s.majorstate == MAJORSTATE_DISCARD) {
s.wordlen = 0;
} else {