Weird C shit

This commit is contained in:
2024-11-22 13:34:03 -05:00
parent 84aa8da622
commit 780895b685
2 changed files with 7 additions and 8 deletions

View File

@@ -106,8 +106,8 @@ void code(UWORD *blackImage, char* confName) {
void config(UWORD *blackImage, char* configName) {
GoString goConfName = { configName, strlen(configName) };
struct getConfig_return getConfigReturn = getConfig(goConfName);
if (getConfigReturn.r1 == -1) {
const char *config = getConfig(goConfName);
if (config == NULL) {
DebugLine(10, 0, "Config not found\n");
return;
}
@@ -119,15 +119,14 @@ void config(UWORD *blackImage, char* configName) {
DebugLine(14, 10, "MADE IT TO HERE --------------------------------------");
Paint_DrawString(5, 5, getConfigReturn.r0, &Font12, WHITE, BLACK);
Paint_DrawString(5, 5, config, &Font12, WHITE, BLACK);
//Paint_DrawString(5, 5, getConfigReturn.r0, &Font12, WHITE, BLACK);
EPD_2in13_V4_Display(blackImage);
int ch = getch();
if (ch == 'q') {
free(getConfigReturn.r0);
return;
}
free(getConfigReturn.r0);
}
void drawTotpHome(UWORD *blackImage, char** configNames, int *length) {