diff options
author | 2008-03-12 20:44:28 +0000 | |
---|---|---|
committer | 2008-03-12 20:44:28 +0000 | |
commit | 9017c978cb14c1487671663de4291cdbc6426fd1 (patch) | |
tree | a05c2629e111ce59e0e2598a5272ab61c4d32057 /src/xmlpullparser.cpp | |
parent | 41b298092ef89f751c4e017494bec8b79c3131d0 (diff) | |
download | newsboat-9017c978cb14c1487671663de4291cdbc6426fd1.tar.gz newsboat-9017c978cb14c1487671663de4291cdbc6426fd1.tar.zst newsboat-9017c978cb14c1487671663de4291cdbc6426fd1.zip |
Andreas Krennmair:
removed unportable alloca().
fixed Makefile.
updated pt_BR translation.
updated ChangeLog.
Diffstat (limited to '')
-rw-r--r-- | src/xmlpullparser.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/xmlpullparser.cpp b/src/xmlpullparser.cpp index c4e10102..6a90038f 100644 --- a/src/xmlpullparser.cpp +++ b/src/xmlpullparser.cpp @@ -435,7 +435,7 @@ std::string xmlpullparser::decode_entity(std::string s) { } else if (s.length() > 1 && s[0] == '#') { std::string result; unsigned int wc; - char * mbc = static_cast<char *>(alloca(MB_CUR_MAX)); + char mbc[MB_CUR_MAX]; mbc[0] = '\0'; if (s[1] == 'x') { s.erase(0,2); @@ -457,7 +457,7 @@ std::string xmlpullparser::decode_entity(std::string s) { } else { for (unsigned int i=0;entity_table[i].entity;++i) { if (s == entity_table[i].entity) { - char * mbc = static_cast<char *>(alloca(MB_CUR_MAX)); + char mbc[MB_CUR_MAX]; int pos = wctomb(mbc, entity_table[i].value); mbc[pos] = '\0'; return std::string(mbc); |