From: Jerome St-Louis Date: Tue, 27 Aug 2013 23:32:57 +0000 (-0400) Subject: ecere/gui/EditBox: Fixed broken highlighting of hexadecimal numbers X-Git-Tag: 0.44.09~32 X-Git-Url: https://ecere.com/cgi-bin/gitweb.cgi?p=sdk;a=commitdiff_plain;h=f9748996922ec12cb0b40eaee6eaae0112f7e3c1 ecere/gui/EditBox: Fixed broken highlighting of hexadecimal numbers --- diff --git a/ecere/src/gui/controls/EditBox.ec b/ecere/src/gui/controls/EditBox.ec index dc6546b..e10e6bb 100644 --- a/ecere/src/gui/controls/EditBox.ec +++ b/ecere/src/gui/controls/EditBox.ec @@ -1724,11 +1724,11 @@ private: { char * dot = strchr(word, '.'); char * s = null; - if(dot && dot == word + wordLen) - strtod(dot+1, &s); + if(dot) + strtod((dot == word + wordLen) ? (dot+1) : word, &s); else - strtod(word, &s); - if(s) + strtol(word, &s, 0); + if(s && s != word) { if((dot && *s == 'f' && !isalnum(s[1]) && s[1] != '_') || (!isalpha(*s) && *s != '_')) {