Skip to content

Commit 2e0e65b

Browse files
committed
string_buffer: dont use memset, just a plain loop
1 parent 68f511f commit 2e0e65b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ast_utils/string_buffer.c2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ public fn void Buf.indent(Buf* buf, u32 indent) {
154154
}
155155

156156
char* cur = buf.data_ + buf.size_;
157-
memset(cur, ' ', indent);
157+
for (u32 i=0; i<indent; i++) cur[i] = ' ';
158158
cur[indent] = 0;
159159
buf.size_ += indent;
160160
}

0 commit comments

Comments
 (0)