diff options
author | Fumitoshi UKAI <ukai@debian.or.jp> | 2002-01-16 02:50:04 +0000 |
---|---|---|
committer | Fumitoshi UKAI <ukai@debian.or.jp> | 2002-01-16 02:50:04 +0000 |
commit | 5446d79271f1e35fe471784e6427c117cc6ea937 (patch) | |
tree | 9ec17b0db38eab3ed9ac6eaa155876f922851c4d /regex.c | |
parent | [w3m-dev 02845] (diff) | |
download | w3m-5446d79271f1e35fe471784e6427c117cc6ea937.tar.gz w3m-5446d79271f1e35fe471784e6427c117cc6ea937.zip |
[w3m-dev 02846]
* regex.c (newRegex0): check msg
From: Hironori Sakamoto <hsaka@mth.biglobe.ne.jp>
Diffstat (limited to 'regex.c')
-rw-r--r-- | regex.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -1,4 +1,4 @@ -/* $Id: regex.c,v 1.11 2002/01/15 18:26:13 ukai Exp $ */ +/* $Id: regex.c,v 1.12 2002/01/16 02:50:04 ukai Exp $ */ /* * regex: Regular expression pattern match library * @@ -172,8 +172,10 @@ newRegex0(char **ex, int igncase, Regex *regex, char **msg, int level) #endif else *(st_ptr++) = (unsigned char)*(p++); - if (st_ptr >= ®ex->storage[STORAGE_MAX]) - *msg = "Regular expression too long"; + if (st_ptr >= ®ex->storage[STORAGE_MAX]) { + if (msg) + *msg = "Regular expression too long"; + } return NULL; } *(st_ptr++) = '\0'; |