diff --git a/Contrib/ExDLL/plugin.c b/Contrib/ExDLL/plugin.c index 24b9e3fe..0a55af19 100644 --- a/Contrib/ExDLL/plugin.c +++ b/Contrib/ExDLL/plugin.c @@ -99,6 +99,21 @@ int NSISCALL myatoi(const char *s) return v; } +unsigned NSISCALL myatou(const char *s) +{ + unsigned int v=0; + + for (;;) + { + unsigned int c=*s++; + if (c >= '0' && c <= '9') c-='0'; + else break; + v*=10; + v+=c; + } + return v; +} + int NSISCALL myatoi_or(const char *s) { int v=0; diff --git a/Contrib/ExDLL/plugin.h b/Contrib/ExDLL/plugin.h index 29e1ab84..63b8b846 100644 --- a/Contrib/ExDLL/plugin.h +++ b/Contrib/ExDLL/plugin.h @@ -60,6 +60,7 @@ int NSISCALL popstringn(char *str, int maxlen); // with length limit, pass 0 for int NSISCALL popint(); // pops an integer int NSISCALL popint_or(); // with support for or'ing (2|4|8) int NSISCALL myatoi(const char *s); // converts a string to an integer +unsigned NSISCALL myatou(const char *s); // converts a string to an unsigned integer, decimal only int NSISCALL myatoi_or(const char *s); // with support for or'ing (2|4|8) void NSISCALL pushstring(const char *str); void NSISCALL pushint(int value);