Skip to content

Conversation

@txemaotero
Copy link
Contributor

  • There are some platforms where char is implemented as unsigned char such as arm architectures. In these systems, the existing code to access the ParseFlagMap and WhitespaceMap arrays will access elements past the end of the arrays.
  • This PR fixes the bug by making the offset to convert the char into an array index dependent on how char is implemented.
  • Modifications on single headers were manually introduced as the command: cmake --build build/ --target=generate_single_header Introduces way more changes than the introduced ones.

Fix: #222
This PR provides an alternative approach that the solution presented in #247

- There are some platforms where `char` is implemented as `unsigned
  char` such as arm architectures. In this systems, the existing code
  to access the `ParseFlagMap` and `WhitespaceMap` arrays will access
  elements past the end of the arrays.
- This PR fixes the bug by making the offset to convert the `char` into
  an array index dependent on how `char` is implemented.
- Modifications on single headers were manually introduced as the
  command:
  `cmake --build build/ --target=generate_single_header`
  Introduces way more changes than the introduced ones.
@vincentlaucsb vincentlaucsb merged commit d18c788 into vincentlaucsb:master Aug 12, 2025
4 checks passed
@vincentlaucsb
Copy link
Owner

Thank you for your thoughtful & robust PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Problem to get header content!

2 participants