浏览代码

Fix to `split_multi_iterator`

gingerBill 2 年之前
父节点
当前提交
97d7e295dd
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      core/strings/strings.odin

+ 1 - 0
core/strings/strings.odin

@@ -1511,6 +1511,7 @@ split_multi_iterate :: proc(it: ^string, substrs: []string) -> (res: string, ok:
 		it^ = it[i+w:]
 		it^ = it[i+w:]
 	} else {
 	} else {
 		// last value
 		// last value
+		res = it^
 		it^ = it[len(it):]
 		it^ = it[len(it):]
 	}
 	}
 	ok = true
 	ok = true