diff --git a/common.c b/common.c index cf5a4aa56..a72cab85c 100644 --- a/common.c +++ b/common.c @@ -1208,14 +1208,14 @@ wchar_t *unescape( const wchar_t * orig, int unescape_special ) case L'\'': { mode = 1; - out_pos--; + in[out_pos] = INTERNAL_SEPARATOR; break; } case L'\"': { mode = 2; - out_pos--; + in[out_pos] = INTERNAL_SEPARATOR; break; } @@ -1236,7 +1236,7 @@ wchar_t *unescape( const wchar_t * orig, int unescape_special ) { if( c == L'\'' ) { - out_pos--; + in[out_pos] = INTERNAL_SEPARATOR; mode = 0; } else @@ -1257,7 +1257,7 @@ wchar_t *unescape( const wchar_t * orig, int unescape_special ) case '"': { mode = 0; - out_pos--; + in[out_pos] = INTERNAL_SEPARATOR; break; } diff --git a/expand.h b/expand.h index ae510728a..02211920f 100644 --- a/expand.h +++ b/expand.h @@ -81,6 +81,11 @@ enum /** Character representing separation between two bracket elements */ BRACKET_SEP, + /** + Separate subtokens in a token with this character. + */ + INTERNAL_SEPARATOR, + } ; @@ -107,11 +112,6 @@ enum /** String containing the character for separating two array elements */ #define ARRAY_SEP_STR L"\x1e" -/** - Separate subtokens in a token with this character. -*/ -#define INTERNAL_SEPARATOR 0xfffffff0 - /**