1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2026-01-05 10:03:27 +00:00

1. Fixed UTF8 characters for notifybar-desktop on linux

2. Fixed compiler warning, and missing #ifdef
This commit is contained in:
Bryan Roe
2020-06-18 22:44:07 -07:00
parent 6158940b6e
commit 885c6de72a
5 changed files with 8 additions and 4 deletions

View File

@@ -119,7 +119,7 @@ void ILibDuktape_Compressor_End(ILibDuktape_DuplexStream *stream, void *user)
avail = sizeof(tmp) - cs->Z.avail_out;
if (avail > 0)
{
cs->crc = crc32(cs->crc, tmp, (unsigned int)avail);
cs->crc = crc32(cs->crc, (unsigned char*)tmp, (unsigned int)avail);
ILibDuktape_DuplexStream_WriteData(cs->ds, tmp, (int)avail);
}
} while (cs->Z.avail_out == 0);
@@ -147,7 +147,7 @@ ILibTransport_DoneState ILibDuktape_Compressor_Write(ILibDuktape_DuplexStream *s
avail = sizeof(tmp) - cs->Z.avail_out;
if (avail > 0)
{
cs->crc = crc32(cs->crc, tmp, (unsigned int)avail);
cs->crc = crc32(cs->crc, (unsigned char*)tmp, (unsigned int)avail);
ret = ILibDuktape_DuplexStream_WriteData(cs->ds, tmp, (int)avail);
}
} while (cs->Z.avail_out == 0);

File diff suppressed because one or more lines are too long

View File

@@ -235,6 +235,7 @@ duk_ret_t ILibDuktape_fs_closeSync(duk_context *ctx)
{
return(0);
}
#ifdef WIN32
if (duk_is_number(ctx, 0))
{
void *tmp = (void*)(uintptr_t)duk_require_uint(ctx, 0);
@@ -257,6 +258,7 @@ duk_ret_t ILibDuktape_fs_closeSync(duk_context *ctx)
return(0);
}
}
#endif
int fd = duk_require_int(ctx, 0);
if (fd < 65535)