From 91e20648f227994b6f0fef05314e28ee53ed51fc Mon Sep 17 00:00:00 2001 From: Rahim Kanji Date: Fri, 19 Dec 2025 16:08:03 +0500 Subject: [PATCH] Fixed an issue where cur_cmd_cmnt was shared across threads --- lib/c_tokenizer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/c_tokenizer.cpp b/lib/c_tokenizer.cpp index 57574a002..38cdc484f 100644 --- a/lib/c_tokenizer.cpp +++ b/lib/c_tokenizer.cpp @@ -519,7 +519,7 @@ void copy_next_char(shared_st* shared_st, const options* opts) { inc_proc_pos(shared_st); } -static char cur_cmd_cmnt[FIRST_COMMENT_MAX_LENGTH]; +static thread_local char cur_cmd_cmnt[FIRST_COMMENT_MAX_LENGTH]; /** * @brief Safer version of 'is_digit_string' performing boundary checks.