Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bad usage of uint8_fast_t in Back_Scan_Utf8_Char
The purpose of the `uint_fast8_t` type in `<stdint.h>` is to allow you to express that you only need 8 bits worth of storage, but the compiler is allowed to decide that the fastest way it can manipulate small quantities on the platform is by using a size larger than 8-bits. https://stackoverflow.com/q/35055042/ Hence it may not be the same size as an `unsigned char`, and should not be used to do things like address into strings (for example). A mistake in the usage of uint_fast8_t that meant to use it to hold a trailing byte count was actually using it on the wrong line, which was making it try to point at characters. This leads to crashes on platforms where sizeof(uint8_fast_t) != sizeof(unsigned char)... for example, OpenBSD. Fix is to use the uint_fast8_t on the right line.
- Loading branch information