From: <enl...@li...> - 2001-03-20 22:22:54
|
Enlightenment CVS committal Author : cpk Project : e17 Module : libs/edb Dir : e17/libs/edb/tools Modified Files: edb_ed.c Log Message: Apparently noone is using this, otherwise somebody would have noticed that strings of escaped numbers (like \037\213) didn't work. =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/edb/tools/edb_ed.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -3 -r1.8 -r1.9 --- edb_ed.c 2001/03/14 04:12:45 1.8 +++ edb_ed.c 2001/03/20 22:24:45 1.9 @@ -16,7 +16,8 @@ unescape_string(char *str) { int i; - char c, val = 0; + unsigned char val = 0; + char c; char *s; for (s = str ; *str != '\0'; str++, s++) @@ -81,7 +82,7 @@ ptr++; } - str = ptr; + str = --ptr; } break; case '0': /* \nnn -- octal value */ @@ -107,14 +108,15 @@ if (!isdigit(digit)) break; - + val *= 8; - val += digit - '0'; + val += (digit - '0'); + *s = val; ptr++; } - str = ptr; + str = --ptr; } break; default: |