Fix two new Visual Studio compiler warnings

This commit is contained in:
Albrecht Schlosser
2022-11-24 17:29:26 +01:00
parent c3011e32e4
commit 40f376a6f7
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -119,7 +119,7 @@ static char *svg_inflate(gzFile gzf, // can be a file or the read end of a pipe
do { do {
if (is_compressed && p + size > out + out_size) { if (is_compressed && p + size > out + out_size) {
out_size += size; out_size += size;
unsigned delta = (p - out); size_t delta = (p - out);
out = (char*)realloc(out, out_size + 1); out = (char*)realloc(out, out_size + 1);
p = out + delta; p = out + delta;
} }
+2 -2
View File
@@ -79,8 +79,8 @@ static const char* expand_text_(const char* from, char*& buf, int maxbuf, double
if (o > e) { if (o > e) {
if (maxbuf) break; // don't overflow buffer if (maxbuf) break; // don't overflow buffer
l_local_buff += int(o - e) + 200; // enlarge buffer l_local_buff += int(o - e) + 200; // enlarge buffer
unsigned delta_o = (o - local_buf); size_t delta_o = (o - local_buf);
unsigned delta_end = (word_end - local_buf); size_t delta_end = (word_end - local_buf);
local_buf = (char*)realloc(local_buf, l_local_buff); local_buf = (char*)realloc(local_buf, l_local_buff);
e = local_buf + l_local_buff - 4; // update pointers to buffer content e = local_buf + l_local_buff - 4; // update pointers to buffer content
o = local_buf + delta_o; o = local_buf + delta_o;