mirror of
https://github.com/weechat/weechat.git
synced 2026-06-29 14:26:39 +02:00
api: fix handle of invalid escape in function string_convert_escaped_chars()
And a new test is now checking that "\" returns "".
This commit is contained in:
@@ -787,9 +787,12 @@ string_convert_escaped_chars (const char *string)
|
||||
}
|
||||
break;
|
||||
default:
|
||||
output[pos_output++] = '\\';
|
||||
output[pos_output++] = ptr_string[0];
|
||||
ptr_string++;
|
||||
if (ptr_string[0])
|
||||
{
|
||||
output[pos_output++] = '\\';
|
||||
output[pos_output++] = ptr_string[0];
|
||||
ptr_string++;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user