parent
04afb63d34
commit
2521909b8c
|
@ -150,7 +150,7 @@ inline uint8_t HexOctetToDecimal(const char* in) {
|
||||||
// ------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------
|
||||||
// signed variant of strtoul10
|
// signed variant of strtoul10
|
||||||
// ------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------
|
||||||
inline int strtol10( const char* in, const char** out=0) {
|
inline int strtol10( const char* in, const char** out = 0) {
|
||||||
bool inv = (*in=='-');
|
bool inv = (*in=='-');
|
||||||
if ( inv || *in == '+' ) {
|
if ( inv || *in == '+' ) {
|
||||||
++in;
|
++in;
|
||||||
|
@ -158,7 +158,7 @@ inline int strtol10( const char* in, const char** out=0) {
|
||||||
|
|
||||||
int value = strtoul10(in,out);
|
int value = strtoul10(in,out);
|
||||||
if (inv) {
|
if (inv) {
|
||||||
if (value < INT_MAX) {
|
if (value < INT_MAX && value > INT_MIN) {
|
||||||
value = -value;
|
value = -value;
|
||||||
} else {
|
} else {
|
||||||
ASSIMP_LOG_WARN( "Converting the string \"", in, "\" into an inverted value resulted in overflow." );
|
ASSIMP_LOG_WARN( "Converting the string \"", in, "\" into an inverted value resulted in overflow." );
|
||||||
|
|
Loading…
Reference in New Issue