- Joined
- Sep 19, 2024
- Messages
- 25
- Reaction score
- 14
- Trophies
- 0
- Age
- 21
- Location
- North Rhine Westphalia
- Website
- github.com
- XP
- 419
- Country

Fixed: I made a simple but stupid underflow error with size_t
That's the simple fix 
I'm currently working on a homebrew game using libctru and citro2D.
When I play the game everything works fine but after a short time the game randomly crashes.
This issue didn't appear before I added the bird as new obstacle.
I would really appreciate if someone could help me there I have really no idea wtf is happening
GitHub repo: https://github.com/BlyZeYT/T-Rex-Game-3DS
C:
size_t secondLastCactusIndex = lastCactusIndex - 1; //lastCactusIndex is size_t as well
if (secondLastCactusIndex < 0) secondLastCactusIndex = length - 1; //Yeah unsigned int < 0 **crying**
C:
size_t secondLastCactusIndex = lastCactusIndex;
if (secondLastCactusIndex == 0) secondLastCactusIndex = length - 1;
I'm currently working on a homebrew game using libctru and citro2D.
When I play the game everything works fine but after a short time the game randomly crashes.
This issue didn't appear before I added the bird as new obstacle.
I would really appreciate if someone could help me there I have really no idea wtf is happening
GitHub repo: https://github.com/BlyZeYT/T-Rex-Game-3DS
Last edited by BlyZe,





