mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-30 04:00:02 +02:00
[reader] Improved previous position algorithm and fixed symbols
This commit is contained in:
@@ -109,7 +109,7 @@ int filesWithExtension(const char* extension, External::Archive::File* files, in
|
||||
#endif
|
||||
|
||||
const char * EndOfPrintableWord(const char * word, const char * end) {
|
||||
if (word == end) {
|
||||
if (word >= end) {
|
||||
return word;
|
||||
}
|
||||
UTF8Decoder decoder(word);
|
||||
@@ -126,11 +126,11 @@ const char * EndOfPrintableWord(const char * word, const char * end) {
|
||||
}
|
||||
|
||||
const char * StartOfPrintableWord(const char * word, const char * start) {
|
||||
if (word == start) {
|
||||
if (word <= start) {
|
||||
return word;
|
||||
}
|
||||
// Go to start of code point with some code points dark magic
|
||||
if (!(*word & 0x80 == 0)) {
|
||||
if (!((*word & 0x80) == 0)) {
|
||||
word--;
|
||||
while (!(*word & 0x80 && *word & 0x40)) {
|
||||
word--;
|
||||
|
||||
Reference in New Issue
Block a user