Fix a compiler warning on windows when sizeof(long)==sizeof(int)

This commit is contained in:
Nick Mathewson 2016-05-12 14:51:38 -04:00
parent 6bc052365a
commit 44cbd00dfa

View File

@ -3273,8 +3273,10 @@ tor_vsscanf(const char *buf, const char *pattern, va_list ap)
*out = lng; *out = lng;
} else { } else {
int *out = va_arg(ap, int *); int *out = va_arg(ap, int *);
#if LONG_MAX > INT_MAX
if (lng < INT_MIN || lng > INT_MAX) if (lng < INT_MIN || lng > INT_MAX)
return n_matched; return n_matched;
#endif
*out = (int)lng; *out = (int)lng;
} }
++pattern; ++pattern;