Skip to content

Commit

Permalink
Allow UnescapeCString to handle escaped quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
rzblue committed Mar 18, 2023
1 parent df3242a commit 02b3708
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions hal/src/main/native/athena/HAL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -316,11 +316,7 @@ void InitializeRoboRioComments(void) {
return;
}
start += searchString.size();
size_t end = fileContents.find("\"", start);
if (end == std::string_view::npos) {
end = fileContents.size();
}
std::string_view escapedComments = wpi::slice(fileContents, start, end);
std::string_view escapedComments = wpi::slice(fileContents, start, fileContents.size());
wpi::SmallString<64> buf;
auto [unescapedComments, rem] = wpi::UnescapeCString(escapedComments, buf);
unescapedComments.copy(roboRioCommentsString,
Expand Down

0 comments on commit 02b3708

Please sign in to comment.