Fix mircansi() so that it properly handles non-numeric characters

after a comma.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@140 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
Kevin Easton
2011-09-07 12:48:35 +00:00
parent cc0a27d7fe
commit 206df688ba
2 changed files with 3 additions and 1 deletions

View File

@@ -1,5 +1,7 @@
[Changes 1.2c01]
* Fix crash bug in $mircansi() scripting function. (caf)
* Add half-op support to /topic and /untopic. (caf)
* Tidy up the URL grabber, fixing a memory leak. (caf)

View File

@@ -998,7 +998,7 @@ struct {
if (code > 15 || code <= 0) code = code % 16;
strcpy(dptr, codes[code].fg);
while (*dptr) dptr++;
if (*sptr == ',')
if (*sptr == ',' && isdigit(sptr[1]))
{
sptr++;
code = *sptr - '0';