Rob Shearman : wrc: Don't accept "0" as a valid codepage in " #pragma code_page" directives.

Alexandre Julliard julliard at winehq.org
Mon Oct 20 08:00:22 CDT 2008


Module: wine
Branch: master
Commit: e3afab26917f4dc952dd10f0b33da6e38c6db6c2
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=e3afab26917f4dc952dd10f0b33da6e38c6db6c2

Author: Rob Shearman <robertshearman at gmail.com>
Date:   Sun Oct 19 10:59:32 2008 +0100

wrc: Don't accept "0" as a valid codepage in "#pragma code_page" directives.

---

 tools/wrc/parser.l |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/wrc/parser.l b/tools/wrc/parser.l
index 6d5189a..863878a 100644
--- a/tools/wrc/parser.l
+++ b/tools/wrc/parser.l
@@ -373,7 +373,7 @@ static unsigned long xstrtoul(const char *nptr, char **endptr, int base)
         yy_pop_state();
         while (*p < '0' || *p > '9') p++;
         current_codepage = strtol( p, NULL, 10 );
-        if (current_codepage && current_codepage != CP_UTF8 && !wine_cp_get_table( current_codepage ))
+        if (current_codepage != CP_UTF8 && !wine_cp_get_table( current_codepage ))
         {
             parser_error("Codepage %d not supported", current_codepage);
             current_codepage = 0;




More information about the wine-cvs mailing list