This commit is contained in:
blueloveTH 2024-08-15 12:01:06 +08:00
parent fa61a28740
commit b1ffa191d2

View File

@ -272,7 +272,11 @@ static bool str_join(int argc, py_Ref argv) {
bool first = true; bool first = true;
while(true) { while(true) {
int res = py_next(py_peek(-1)); 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(res == 0) break;
if(!first) c11_sbuf__write_sv(&buf, self); if(!first) c11_sbuf__write_sv(&buf, self);