FFstrbuf: silence a compiler warning

This commit is contained in:
李通洲
2026-04-09 13:24:10 +08:00
parent e8e43c10fc
commit af884bb638
+1 -1
View File
@@ -247,7 +247,7 @@ void ffStrbufSetNS(FFstrbuf* strbuf, uint32_t length, const char* value) {
assert(value != NULL);
if (strbuf->allocated < length + 1) {
if (strbuf->allocated <= length) {
char* newBuf = malloc(sizeof(char) * (length + 1));
memcpy(newBuf, value, length);
if (strbuf->allocated > 0) {