Commit 9ed64292 9ed64292e5c273a1050e70f7b7947bfed7dbb24b by Sergey Poznyakoff

(argcv_escape_char,escape_copy): Bugfix

1 parent fc3bc544
...@@ -117,7 +117,7 @@ argcv_escape_char (int c) ...@@ -117,7 +117,7 @@ argcv_escape_char (int c)
117 if (*p == c) 117 if (*p == c)
118 return p[-1]; 118 return p[-1];
119 } 119 }
120 return c; 120 return -1;
121 } 121 }
122 122
123 123
...@@ -259,7 +259,7 @@ escape_copy (char *dst, const char *src) ...@@ -259,7 +259,7 @@ escape_copy (char *dst, const char *src)
259 else 259 else
260 { 260 {
261 char tmp[4]; 261 char tmp[4];
262 snprintf (tmp, sizeof tmp, "%03o", *src); 262 snprintf (tmp, sizeof tmp, "%03o", *(unsigned char*)src);
263 memcpy (dst, tmp, 3); 263 memcpy (dst, tmp, 3);
264 dst += 3; 264 dst += 3;
265 } 265 }
......