From bc8ab4cc8185e62dd9bfb3c760b7e03638bffa01 Mon Sep 17 00:00:00 2001 From: janwas Date: Sat, 31 Jul 2004 01:57:26 +0000 Subject: [PATCH] slight improvements in use of res code. This was SVN commit r847. --- source/lib/res/unifont.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/source/lib/res/unifont.cpp b/source/lib/res/unifont.cpp index f6f7023e68..5c250bd577 100755 --- a/source/lib/res/unifont.cpp +++ b/source/lib/res/unifont.cpp @@ -1,5 +1,5 @@ /* -$Id: unifont.cpp,v 1.11 2004/07/29 16:11:33 philip Exp $ +$Id: unifont.cpp,v 1.12 2004/07/31 01:57:26 janwas Exp $ Unicode OpenGL texture font @@ -67,15 +67,13 @@ static int UniFont_reload(UniFont* f, const char* fn, Handle UNUSEDPARAM(h)) std::string FilenameFnt = FilenameBase+".fnt"; const char* fnt_fn = FilenameFnt.c_str(); Handle fh = vfs_load(fnt_fn, RawFNT, FNTSize); - - if (fh <= 0) - return (int)fh; + CHECK_ERR(fh); // Get the data in a nicer object std::istringstream FNTStream (std::string((char*)RawFNT, (int)FNTSize)); // Unload the file - mem_free_h(fh); + mem_free(RawFNT); int Version; FNTStream >> Version;