blueloveTH 1 yıl önce
ebeveyn
işleme
b1ffa191d2
1 değiştirilmiş dosya ile 5 ekleme ve 1 silme
  1. 5 1
      src/public/py_str.c

+ 5 - 1
src/public/py_str.c

@@ -272,7 +272,11 @@ static bool str_join(int argc, py_Ref argv) {
     bool first = true;
     while(true) {
         int res = py_next(py_peek(-1));
-        if(res == -1) return false;
+        if(res == -1) {
+            c11_sbuf__dtor(&buf);
+            return false;
+        }
+
         if(res == 0) break;
 
         if(!first) c11_sbuf__write_sv(&buf, self);