Skip to content

Commit d33423a

Browse files
committed
Fix inapproproate place of total size calculation
Signed-off-by: Hiroshi Hatake <[email protected]>
1 parent c888e6f commit d33423a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ext/zstdruby/streaming_compress.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,10 @@ rb_streaming_compress_write(int argc, VALUE *argv, VALUE obj)
169169
if (output.pos > 0) {
170170
rb_str_cat(sc->pending, output.dst, output.pos);
171171
}
172-
total += RSTRING_LEN(str);
173172
}
173+
total += RSTRING_LEN(str);
174174
}
175+
175176
return SIZET2NUM(total);
176177
}
177178

0 commit comments

Comments
 (0)