Skip to content

Commit

Permalink
Fix a crash when auto-indenting C/C++ code.
Browse files Browse the repository at this point in the history
  • Loading branch information
ileonte committed Apr 7, 2024
1 parent 424c17d commit 5c5ccd1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/langs/common.jai
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ tokenize_c_like_lang_for_indentation :: (using buffer: Buffer, $get_next_token:

tokenizer := get_tokenizer(buffer);

// Allocate temporary space for tracking one previous token
tokenizer.prev_tokens[0] = New(Token,, temp);

while true {
src := get_next_token(*tokenizer);

Expand Down

0 comments on commit 5c5ccd1

Please sign in to comment.