From ab324bb164ed74f67c768c81864657bbd3dea5e9 Mon Sep 17 00:00:00 2001 From: Markus Gans Date: Mon, 6 Jul 2015 23:30:23 +0200 Subject: [PATCH] Class FString: typecast --- src/fstring.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fstring.cpp b/src/fstring.cpp index 4aa91503..ceac4b7e 100644 --- a/src/fstring.cpp +++ b/src/fstring.cpp @@ -943,7 +943,7 @@ sInt16 FString::toShort() const uInt16 FString::toUShort() const { register uLong num; - num = this->toLong(); + num = uLong(this->toLong()); if ( num > USHRT_MAX ) throw std::overflow_error ("overflow"); @@ -967,7 +967,7 @@ int FString::toInt() const uInt FString::toUInt() const { register uLong num; - num = this->toLong(); + num = uLong(this->toLong()); if ( num > UINT_MAX ) throw std::overflow_error ("overflow");