diff --git a/c/src/p2fa.c b/c/src/p2fa.c index fd43cd5..bd28599 100644 --- a/c/src/p2fa.c +++ b/c/src/p2fa.c @@ -77,6 +77,8 @@ void home(UWORD *blackImage) { if (i < length - 1) i++; break; case '\n': + GoString goConfigName; + getCode(configNames[i]); break; case 'q': @@ -88,7 +90,6 @@ void home(UWORD *blackImage) { Paint_DrawString(115, 5 + (i * 20), "<", &Font12, WHITE, BLACK); } - Paint_ClearWindows(); freeCStringArray(configNames, length); diff --git a/go/totp.go b/go/totp.go index 7c1f720..3227f5c 100644 --- a/go/totp.go +++ b/go/totp.go @@ -151,14 +151,6 @@ func getCode(configName string) *C.char { return cCode } -//export getCodeFromI -func getCodeFromI(index int) *C.char { - code := configs[index].TOTP() - cCode := C.CString(code) - runtime.KeepAlive(code) - return cCode -} - //export getTimeRemaining func getTimeRemaining(n int) uint64 { return uint64(n) - (uint64(time.Now().Unix()) % uint64(n))