Created
March 18, 2023 17:26
-
-
Save hcfcoder/9d3eb3212ce39bccd5dac95edf097d5a to your computer and use it in GitHub Desktop.
Using Regex makes the program crash, without even starting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <hal/xbox.h> | |
#include <hal/video.h> | |
#include <hal/debug.h> | |
#include <SDL.h> | |
//INCLUDING THESE LINES MAKES THE PROGRAM CRASH WITHOUT EVEN STARTING | |
#include <regex> | |
static std::regex _includeRegex = std::regex("\\s*#include\\s+([\\\\/A-Za-z0-9_\\-\\.]+)"); | |
//INCLUDING THESE LINES MAKES THE PROGRAM CRASH WITHOUT EVEN STARTING | |
void vdLog(char *msg) | |
{ | |
debugPrint(msg); | |
SDL_Delay(3000); | |
} | |
int main(int argc, char* argv[]) | |
{ | |
XVideoSetMode(640, 480, 32, REFRESH_DEFAULT); | |
SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO); | |
if (SDL_VideoInit(NULL) < 0) | |
{ | |
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't initialize SDL video.\n"); | |
} | |
//This message is not displayed, because the program is not even executing | |
vdLog("START!\n"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment