Fix warning: signed and unsigned type in conditional expression [-Wsign-compare]

git-svn-id: https://svn.eduke32.com/eduke32@5852 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2016-09-06 02:15:37 +00:00
parent da52bac304
commit 4a6676dd87

View file

@ -504,7 +504,7 @@ int32_t loadpics(const char *filename, int32_t askedsize)
Bmemset(gotpic, 0, sizeof(gotpic));
//cachesize = min((int32_t)((Bgetsysmemsize()/100)*60),max(artsize,askedsize));
cachesize = (Bgetsysmemsize() <= (uint32_t)askedsize) ? (Bgetsysmemsize() / 100) * 60 : askedsize;
cachesize = (Bgetsysmemsize() <= (uint32_t)askedsize) ? (int32_t)((Bgetsysmemsize() / 100) * 60) : askedsize;
// NOTE: this doesn't make a lot of sense on modern OSs...
while ((pic = Bmalloc(cachesize)) == NULL)