Mercurial > hg > dmlib
comparison tools/gfxconv.c @ 2496:6a6ed3eeded5
Fix parsing of some arguments to -S option.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 28 Apr 2020 20:55:34 +0300 |
parents | 88c68a03c493 |
children | ea5929b04a26 |
comparison
equal
deleted
inserted
replaced
2495:88c68a03c493 | 2496:6a6ed3eeded5 |
---|---|
918 { | 918 { |
919 optSpec.scaleX = tmpUInt; | 919 optSpec.scaleX = tmpUInt; |
920 optSpec.scaleY = tmpUInt2; | 920 optSpec.scaleY = tmpUInt2; |
921 | 921 |
922 if (sep == '*' && | 922 if (sep == '*' && |
923 dmParseIntValWithSep(&tmpOpt, &tmpUInt, &sep, 0)) | 923 dmParseIntValWithSep(&tmpOpt, &tmpUInt, &sep, "")) |
924 { | 924 { |
925 optSpec.scaleX *= tmpUInt; | 925 optSpec.scaleX *= tmpUInt; |
926 optSpec.scaleY *= tmpUInt; | 926 optSpec.scaleY *= tmpUInt; |
927 } | 927 } |
928 error = (sep != 0); | 928 error = (sep != 0); |
941 dmFree(tmpStr); | 941 dmFree(tmpStr); |
942 | 942 |
943 if (error) | 943 if (error) |
944 { | 944 { |
945 dmErrorMsg( | 945 dmErrorMsg( |
946 "Invalid scale option value '%s', should be <n>, <w>:<h> or <w>:<h>*<n>.\n", | 946 "Invalid scale option value '%s', should be [*]<n> or or <w>:<h>[*<n>].\n", |
947 optArg); | 947 optArg); |
948 return FALSE; | 948 return FALSE; |
949 } | 949 } |
950 | 950 |
951 if (optSpec.scaleX < 1 || optSpec.scaleX > 50) | 951 if (optSpec.scaleX < 1 || optSpec.scaleX > 50) |