(argcv_escape_char,escape_copy): Bugfix
Showing
1 changed file
with
2 additions
and
2 deletions
... | @@ -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 | } | ... | ... |
-
Please register or sign in to post a comment