Browse Source

Fixed the error message when only one argument is given to newImageFont (resolves issue #737)

Alex Szpakowski 12 years ago
parent
commit
f89097ed90
1 changed files with 1 additions and 0 deletions
  1. 1 0
      src/modules/graphics/opengl/wrap_Graphics.cpp

+ 1 - 0
src/modules/graphics/opengl/wrap_Graphics.cpp

@@ -395,6 +395,7 @@ int w_newImageFont(lua_State *L)
 	// Convert to Rasterizer if necessary.
 	if (luax_istype(L, 1, IMAGE_IMAGE_DATA_T))
 	{
+		luaL_checkstring(L, 2);
 		int idxs[] = {1, 2};
 		luax_convobj(L, idxs, 2, "font", "newRasterizer");
 	}