Homebrew Homebrew game Homebrew game randomly crashing

  • Thread starter Thread starter BlyZe
  • Start date Start date
  • Views Views 501
  • Replies Replies 0

BlyZe

Active Member
Newcomer
Joined
Sep 19, 2024
Messages
25
Reaction score
14
Trophies
0
Age
21
Location
North Rhine Westphalia
Website
github.com
XP
419
Country
Germany
Fixed: I made a simple but stupid underflow error with size_t
C:
size_t secondLastCactusIndex = lastCactusIndex - 1; //lastCactusIndex is size_t as well
if (secondLastCactusIndex < 0) secondLastCactusIndex = length - 1; //Yeah unsigned int < 0 **crying**
That's the simple fix :)
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

WhatsApp Image 2024-09-28 at 21.00.28.jpeg
 
Last edited by BlyZe,

Site & Scene News

Popular threads in this forum