diff options
author | xhe <xw897002528@gmail.com> | 2017-05-20 08:09:37 +0800 |
---|---|---|
committer | xhe <xw897002528@gmail.com> | 2017-05-20 08:12:23 +0800 |
commit | 4bf136b7a614417eb06ed9ef24d388c883e8b0d5 (patch) | |
tree | 7fe2bd6cb8579c753780340b9d3444d0353c4e0b | |
parent | 06ddb2e43589b91da2117a32ca92f3277d3f748e (diff) | |
download | gettext-tiny-4bf136b7a614417eb06ed9ef24d388c883e8b0d5.tar.gz |
replace 0x30 with '0' for better reading code
follow https://github.com/sabotage-linux/gettext-tiny/commit/7409501c4cdd4c8d89e6898405816c636a129dc7#commitcomment-22212741
-rw-r--r-- | src/poparser.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/poparser.c b/src/poparser.c index 5a2f9b2..c791063 100644 --- a/src/poparser.c +++ b/src/poparser.c @@ -32,7 +32,7 @@ static enum po_entry get_type_and_start(struct po_info *info, char* lp, char* en else if ((x = strstarts(y, "ctxt")) && isspace(*x)) result_type = pe_ctxt; else if ((x = strstarts(y, "str")) && (isspace(*x) || - (x[0] == '[' && (x[1]-0x30) < info->nplurals && x[2] == ']' && (x += 3) && isspace(*x)))) + (x[0] == '[' && (x[1]-'0') < info->nplurals && x[2] == ']' && (x += 3) && isspace(*x)))) result_type = pe_msgstr; else goto inv; @@ -53,8 +53,8 @@ static enum po_entry get_type_and_start(struct po_info *info, char* lp, char* en } } if(x = strstr(lp, "nplurals=")) - if(*(x+9) - 0x30) - info->nplurals = *(x+9) - 0x30; + if(*(x+9) - '0') + info->nplurals = *(x+9) - '0'; result_type = pe_str; x = lp; goto conv; |