<commit_before>#include "DSGM.h"

void DSGM_Debug(char *text, ...) {
	#ifdef DEBUG
		char buff[1024];
		va_list args;
		va_start(args, text);
		vsprintf(buff, text, args);
		va_end(args);
		nocashMessage(buff);
		while(!DSGM_newpress.Start) DSGM_UpdateInput();
		while(DSGM_newpress.Start) DSGM_UpdateInput();
	#endif
}

void DSGM_Log(bool wait, char *text, ...) {
	char buff[1024];
	va_list args;
	va_start(args, text);
	vsprintf(buff, text, args);
	va_end(args);
	nocashMessage(buff);
	if(wait) {
		while(!DSGM_newpress.Start) DSGM_UpdateInput();
		while(DSGM_newpress.Start) DSGM_UpdateInput();
	}
}

void DSGM_InitGFX(void) {
	videoSetMode(MODE_0_2D);
	videoSetModeSub(MODE_0_2D);<commit_msg>Buffer overflow in debug printing<commit_after>#include "DSGM.h"

void DSGM_Debug(char *text, ...) {
	#ifdef DEBUG
		char buff[1024];
		va_list args;
		va_start(args, text);
		vsnprintf(buff, 1023, text, args);
		va_end(args);
		nocashMessage(buff);
		while(!DSGM_newpress.Start) DSGM_UpdateInput();
		while(DSGM_newpress.Start) DSGM_UpdateInput();
	#endif
}

void DSGM_Log(bool wait, char *text, ...) {
	char buff[1024];
	va_list args;
	va_start(args, text);
	vsnprintf(buff, 1023, text, args);
	va_end(args);
	nocashMessage(buff);
	if(wait) {
		while(!DSGM_newpress.Start) DSGM_UpdateInput();
		while(DSGM_newpress.Start) DSGM_UpdateInput();
	}
}

void DSGM_InitGFX(void) {
	videoSetMode(MODE_0_2D);
	videoSetModeSub(MODE_0_2D);
{'fraction_non_alphanumeric': 0.14866760168302945, 'fraction_numerical': 0.02244039270687237, 'mean_word_length': 5.76303317535545, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4768137', 'n_tokens_mistral': 623, 'n_tokens_neox': 586, 'n_words': 101}