diff options
author | Bruno Haible <bruno@clisp.org> | 2001-07-11 16:33:31 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2001-07-11 16:33:31 +0000 |
commit | d8b92b2dc40daa77926d200a3a94828e14112c73 (patch) | |
tree | d5f738b9e81f150753f937f5c92cccc093e61789 | |
parent | 2f6f7a645c1654cb3dae5e6ae63d3e44f0aa5eec (diff) | |
download | external_gettext-d8b92b2dc40daa77926d200a3a94828e14112c73.zip external_gettext-d8b92b2dc40daa77926d200a3a94828e14112c73.tar.gz external_gettext-d8b92b2dc40daa77926d200a3a94828e14112c73.tar.bz2 |
Don't treat strings with a trailing % sign as C format strings.
-rw-r--r-- | src/ChangeLog | 6 | ||||
-rw-r--r-- | src/xgettext.c | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 04a11ea..5dd8a08 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2001-07-11 Bruno Haible <haible@clisp.cons.org> + + * xgettext.c (test_whether_c_format): When encountering an + unterminated % format specifier, return 'impossible'. + Reported by Gaute B Strokkenes <gs234@cam.ac.uk>. + 2001-07-09 Bruno Haible <haible@clisp.cons.org> * write-po.c (has_nonascii): New function. diff --git a/src/xgettext.c b/src/xgettext.c index 9d3a599..fda37e9 100644 --- a/src/xgettext.c +++ b/src/xgettext.c @@ -1408,7 +1408,8 @@ test_whether_c_format (s) size_t dummy; (void) parse_one_spec (s, 0, &spec, &dummy); - if (strchr ("iduoxXeEfgGcspnm%", spec.info.spec) == NULL) + if (spec.info.spec == '\0' + || strchr ("iduoxXeEfgGcspnm%", spec.info.spec) == NULL) return impossible; } |