diff options
-rw-r--r-- | src/parser/clang/parsing.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/parser/clang/parsing.rs b/src/parser/clang/parsing.rs index f772d4f..c573fc6 100644 --- a/src/parser/clang/parsing.rs +++ b/src/parser/clang/parsing.rs | |||
@@ -290,7 +290,8 @@ pub fn parse_comment(raw: String) -> String { | |||
290 | break; | 290 | break; |
291 | } | 291 | } |
292 | Some(position) => { | 292 | Some(position) => { |
293 | result.push_str(&rest[..=position]); | 293 | // Use chars here because str indexing is bytes instead of characters |
294 | result.extend(rest.chars().take(position + 1)); | ||
294 | chars.nth(position); | 295 | chars.nth(position); |
295 | } | 296 | } |
296 | } | 297 | } |