From 1035f576164ceb50f85b787459ad760e0ac7b2b9 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Mon, 1 Nov 2010 17:23:01 +0000 Subject: Wow...floats...I mean...wow... --- src/dictionary.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/dictionary.cpp b/src/dictionary.cpp index 9791203..4430e73 100644 --- a/src/dictionary.cpp +++ b/src/dictionary.cpp @@ -191,7 +191,7 @@ int64_t Gats::Dictionary::getInt( const Bu::FString &sKey ) double Gats::Dictionary::getFloat( const Bu::FString &sKey ) { Gats::Float *pOb = dynamic_cast( get( sKey ) ); - if( pOb ) + if( !pOb ) throw Bu::ExceptionBase("Cannot use %s item '%s' as float.", typeToStr( get( sKey )->getType() ), sKey.getStr() ); @@ -251,7 +251,7 @@ int64_t Gats::Dictionary::getInt( const Bu::FString &sKey ) const double Gats::Dictionary::getFloat( const Bu::FString &sKey ) const { Gats::Float *pOb = dynamic_cast( get( sKey ) ); - if( pOb ) + if( !pOb ) throw Bu::ExceptionBase("Cannot use %s item '%s' as float.", typeToStr( get( sKey )->getType() ), sKey.getStr() ); -- cgit v1.2.3