some fixes

This commit is contained in:
Nishi 2026-09-23 18:14:10 +09:00
commit 9c671b8527
3 changed files with 16 additions and 16 deletions

View file

@ -28,7 +28,7 @@ Sj4Lib* sj4_open(int charset, const char* dic) {
if((ctx = calloc(1, sizeof(*ctx))) == NULL) return NULL;
if((ctx->ctx = alloccontext(dic)) == NULL) {
free(ctx);
free((char*)ctx);
return NULL;
}
@ -96,5 +96,5 @@ int sj4_prevkan(Sj4Lib* ctx) {
void sj4_close(Sj4Lib* ctx) {
free_context(ctx->ctx);
free(ctx);
free((char*)ctx);
}