Don't look beyond the end of a cparse format if it ends with % or $.

git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@310 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
Kevin Easton
2013-08-10 15:59:04 +00:00
parent 9e0ba0a573
commit c7cefb1c05

View File

@@ -4626,12 +4626,17 @@ char *timestamp_str = get_string_var(TIMESTAMP_STRING_VAR);
char *cs;
tmpc++;
this_color = BLACK;
if (*tmpc == '\0')
{
*s++ = '%';
continue;
}
if (*tmpc == '%')
{
*s++ = *tmpc++;
continue;
}
else if (isdigit((unsigned char)*tmpc))
if (isdigit((unsigned char)*tmpc))
{
char background_mod[] = "01234567";
char *blah = background_mod;
@@ -4708,6 +4713,11 @@ char *timestamp_str = get_string_var(TIMESTAMP_STRING_VAR);
{
char *new_str = NULL;
tmpc++;
if (*tmpc == '\0')
{
*s++ = '$';
continue;
}
if (*tmpc == '$')
{
*s++ = *tmpc++;