summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9fc47db)
raw | patch | inline | side by side (parent: 9fc47db)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Thu, 19 Mar 2020 17:49:22 +0000 (20:49 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Thu, 19 Mar 2020 17:49:22 +0000 (20:49 +0300) |
src/gl/render.c | patch | blob | history |
diff --git a/src/gl/render.c b/src/gl/render.c
index c1260da8f3f8aebbcb67b00d299922a6d606e6b9..e74d6bb5229989165983fcc619a715a25cfdd41c 100644 (file)
--- a/src/gl/render.c
+++ b/src/gl/render.c
static short getani (char n[8]) {
short i = 0;
- while (i < ANIT && strncasecmp(n, anm[i][0], 8) != 0) {
+ while (i < ANIT - 1 && strncasecmp(n, anm[i][0], 8) != 0) {
i++;
}
- return i < ANIT ? i + 1 : 0;
+ return i < ANIT - 1 ? i + 1 : 0;
}
int R_get_special_id (int n) {
};
} else if (strncasecmp(s, "_WATER_", 7) == 0) {
walp[max_textures] = (image) {
- .n = (void*)(s[7] - '0' + 1),
+ .n = (void*)((intptr_t)s[7] - '0' + 1),
.x = 0,
.y = 0,
.w = 8,