diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2012-08-04 15:11:43 -0700 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2012-08-04 15:11:43 -0700 |
commit | c67702a4989c450acd2c9f02fb65aa757f74880f (patch) | |
tree | f1def9222481625273521642d68db72c46b866b1 /signal.cpp | |
parent | 5880cd88c8e378efb3c76e0cfdff99dce0edf810 (diff) |
Cleaned up lots of typecasts, simplified some string handling
Diffstat (limited to 'signal.cpp')
-rw-r--r-- | signal.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -384,10 +384,10 @@ int wcs2sig( const wchar_t *str ) } } errno=0; - long res = wcstol( str, &end, 10 ); - if( !errno && res>=0 && res <= INT_MAX && !*end ) - return (int)res; - + int res = fish_wcstoi( str, &end, 10 ); + if( !errno && res>=0 && !*end ) + return res; + return -1; } |