about summary refs log tree commit diff
path: root/cards.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-03-15 15:58:29 -0400
committerJune McEnroe <june@causal.agency>2019-03-15 15:58:29 -0400
commit031cbc6eb23bf5b58f0b3c3cba5ed26cc52cf58e (patch)
tree339f9aa8d1d5e46e29a3a342cc1f1e76a0a156c8 /cards.c
parentTurn on -Wpedantic (diff)
downloadcards-031cbc6eb23bf5b58f0b3c3cba5ed26cc52cf58e.tar.gz
cards-031cbc6eb23bf5b58f0b3c3cba5ed26cc52cf58e.zip
Simplify Cards constants
Diffstat (limited to 'cards.c')
-rw-r--r--cards.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cards.c b/cards.c
index 2e8ab20..35660ad 100644
--- a/cards.c
+++ b/cards.c
@@ -131,7 +131,7 @@ struct Cards *Cards_Load(struct SDL_RWops *rw) {
 		SDL_ReadLE32(rw); // reserved
 
 		id &= 0x7FFF;
-		if (id >= Cards_CardLen) continue;
+		if (id >= Cards_Count) continue;
 
 		Sint64 next = SDL_RWtell(rw);
 		if (next < 0) goto fail;
@@ -173,7 +173,7 @@ fail:
 }
 
 void Cards_Free(struct Cards *cards) {
-	for (int i = 0; i < Cards_CardLen; ++i) {
+	for (int i = 0; i < Cards_Count; ++i) {
 		if (!cards->surfaces[i]) continue;
 		SDL_FreeSurface(cards->surfaces[i]);
 	}