billiob pushed a commit to branch master.
commit 72bbb101f826c61a23e55c0262476787616b7dab
Author: Boris Faure <[email protected]>
Date: Sun Apr 28 17:35:48 2013 +0200
compat: csi parameters are always decimal
There can be some leading zeros.
---
src/bin/termptyesc.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/src/bin/termptyesc.c b/src/bin/termptyesc.c
index c1277eb..1044581 100644
--- a/src/bin/termptyesc.c
+++ b/src/bin/termptyesc.c
@@ -33,7 +33,6 @@ static int
_csi_arg_get(Eina_Unicode **ptr)
{
Eina_Unicode *b = *ptr;
- int octal = 0;
int sum = 0;
while ((*b) && (!isdigit(*b))) b++;
@@ -42,11 +41,9 @@ _csi_arg_get(Eina_Unicode **ptr)
*ptr = NULL;
return 0;
}
- if (*b == '0') octal = 1;
while (isdigit(*b))
{
- if (octal) sum *= 8;
- else sum *= 10;
+ sum *= 10;
sum += *b - '0';
b++;
}
--
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev