texture size error fix

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3498 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lee Salzman
2008-11-15 06:57:33 +00:00
parent a0f6c067fe
commit 5db498098a
+6
View File
@@ -192,6 +192,12 @@ GLuint loadsurface(const char *texname, int &xs, int &ys, int &bpp, int clamp)
conoutf("texture must be 8, 16, 24, or 32 bpp: %s", texname);
return 0;
}
if(max(s->w, s->h) > (1<<12))
{
SDL_FreeSurface(s);
conoutf("texture size exceeded %dx%d pixels: %s", 1<<12, 1<<12, texname);
return 0;
}
if(texname[0]=='<')
{