diff options
author | pixel <pixel> | 2003-12-12 12:45:20 +0000 |
---|---|---|
committer | pixel <pixel> | 2003-12-12 12:45:20 +0000 |
commit | d6214b0f60cb6c8386723717159b9212b1d55174 (patch) | |
tree | 0bad092aea1fabfe121f64c5fe78a9322216513e | |
parent | bacf50104daa09cd90f8dc36c06a6982d91000af (diff) |
Small bugfixes
-rw-r--r-- | lib/cdutils.cpp | 4 | ||||
-rw-r--r-- | lib/luacd.cpp | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/lib/cdutils.cpp b/lib/cdutils.cpp index 82e460a..9e81c89 100644 --- a/lib/cdutils.cpp +++ b/lib/cdutils.cpp @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: cdutils.cpp,v 1.19 2003-12-11 16:53:43 pixel Exp $ */ +/* $Id: cdutils.cpp,v 1.20 2003-12-12 12:45:20 pixel Exp $ */ #include <stdio.h> #include <string.h> @@ -458,7 +458,7 @@ struct cdutils::DirEntry * cdutils::find_dir_entry(Byte ** bufout, struct cdutil } } - if (rdir->R) { + if (rdir && rdir->R) { free(*bufout); *bufout = buffer; } else { diff --git a/lib/luacd.cpp b/lib/luacd.cpp index cab50b2..0e10af1 100644 --- a/lib/luacd.cpp +++ b/lib/luacd.cpp @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: luacd.cpp,v 1.5 2003-12-11 16:53:43 pixel Exp $ */ +/* $Id: luacd.cpp,v 1.6 2003-12-12 12:45:20 pixel Exp $ */ #include "luacd.h" @@ -480,7 +480,7 @@ int sLua_cdfile::cdfile_proceed_statics(Lua * L, int n, int caller) { switch(caller) { case CDFILE_NEWCDFILE: cd = (cdutils *) LuaObject::getme(L, 1); - if (L->islightuserdata(2)) { + if (L->istable(2)) { if (n <= 3) { dir = (cdutils::DirEntry *) LuaObject::getme(L, 2); if (n == 3) @@ -504,7 +504,7 @@ int sLua_cdfile::cdfile_proceed_statics(Lua * L, int n, int caller) { invalid = true; } if (invalid) { - L->error("Invalid arguments to constructor of cdutils"); + L->error("Invalid arguments to constructor of cdfile"); } else { Luacdfile luacdf(cdf); luacdf.pushdestruct(L); @@ -1354,7 +1354,7 @@ struct lua_functypes_t isobuilder_methods[] = { { ISOBUILDER_CLEAREOF, "clearEOF", 0, 0, 0 }, { ISOBUILDER_SETBASICS, "setbasics", 1, 5, {LUA_OBJECT, LUA_NUMBER, LUA_NUMBER, LUA_NUMBER, LUA_NUMBER} }, { ISOBUILDER_CREATEDIR, "createdir", 2, 5, {LUA_OBJECT, LUA_STRING, LUA_NUMBER, LUA_OBJECT, LUA_NUMBER} }, - { ISOBUILDER_CREATEFILE, "createfile", 3, 5, {LUA_OBJECT, LUA_OBJECT, LUA_STRING, LUA_OBJECT, LUA_NUMBER} }, + { ISOBUILDER_CREATEFILE, "createfile", 3, 5, {LUA_OBJECT, LUA_STRING, LUA_OBJECT, LUA_OBJECT, LUA_NUMBER} }, { ISOBUILDER_COPYDIR, "copydir", 3, 4, {LUA_OBJECT, LUA_OBJECT, LUA_OBJECT, LUA_NUMBER} }, { ISOBUILDER_CLOSE, "close", 0, 2, {LUA_OBJECT, LUA_NUMBER} }, { -1, 0, 0, 0, 0 } @@ -1547,8 +1547,8 @@ int sLua_isobuilder::isobuilder_proceed(Lua * L, int n, isobuilder * iso, int ca break; case ISOBUILDER_CREATEFILE: dirt = (DirTree *) LuaObject::getme(L, 2); - h = (Handle *) LuaObject::getme(L, 3); - name = L->tostring(4); + name = L->tostring(3); + h = (Handle *) LuaObject::getme(L, 4); if (n >= 4) dire = (direntry *) LuaObject::getme(L, 5); if (n >= 5) |