Skip to content

Commit d72bd96

Browse files
committed
fixup! refactor: zstd_uncompress_dict()
1 parent e8bde67 commit d72bd96

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

zstd.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,9 @@ ZEND_FUNCTION(zstd_uncompress_dict)
356356
ZEND_PARSE_PARAMETERS_END();
357357

358358
size = ZSTD_getFrameContentSize(input, input_len);
359-
if (size == 0 || size == ZSTD_CONTENTSIZE_ERROR) {
359+
if (size == 0) {
360+
RETURN_EMPTY_STRING();
361+
} else if (size == ZSTD_CONTENTSIZE_ERROR) {
360362
ZSTD_WARNING("it was not compressed by zstd");
361363
RETURN_FALSE;
362364
} else if (size == ZSTD_CONTENTSIZE_UNKNOWN) {

0 commit comments

Comments
 (0)