Weird segmentation faults
This commit is contained in:
parent
0abc7946c1
commit
2805cf9ab1
@ -117,11 +117,17 @@ void config(UWORD *blackImage, char* configName) {
|
|||||||
Paint_SelectImage(blackImage);
|
Paint_SelectImage(blackImage);
|
||||||
Paint_Clear(WHITE);
|
Paint_Clear(WHITE);
|
||||||
|
|
||||||
|
DebugLine(14, 10, "MADE IT TO HERE --------------------------------------");
|
||||||
|
|
||||||
Paint_DrawString(5, 5, getConfigReturn.r0, &Font12, WHITE, BLACK);
|
Paint_DrawString(5, 5, getConfigReturn.r0, &Font12, WHITE, BLACK);
|
||||||
EPD_2in13_V4_Display(blackImage);
|
EPD_2in13_V4_Display(blackImage);
|
||||||
|
|
||||||
int ch = getch();
|
int ch = getch();
|
||||||
if (ch == 'q') return;
|
if (ch == 'q') {
|
||||||
|
free(getConfigReturn.r0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
free(getConfigReturn.r0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void drawTotpHome(UWORD *blackImage, char** configNames, int *length) {
|
void drawTotpHome(UWORD *blackImage, char** configNames, int *length) {
|
||||||
|
@ -172,7 +172,7 @@ func getConfig(configName string) (*C.char, C.int) {
|
|||||||
fileStr := string(fileBytes)
|
fileStr := string(fileBytes)
|
||||||
cStr := C.CString(fileStr)
|
cStr := C.CString(fileStr)
|
||||||
runtime.KeepAlive(fileStr)
|
runtime.KeepAlive(fileStr)
|
||||||
return (*C.char)(cStr), (C.int)(len(fileStr))
|
return cStr, (C.int)(len(fileStr))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return nil, -1
|
return nil, -1
|
||||||
|
Loading…
Reference in New Issue
Block a user