History

Fix check in findOffset

Edwin Brady committed 6 years ago

Commit 6ef86bc1 parent 72597431 file · +1 −1Browse files

Unified · Split

dist/rts/idris_utf8.c+1−1
@@ -105,7 +105,7 @@ char* idris_utf8_advance(char* str, int i) { · 104 unmodified lines
105 105
106int idris_utf8_findOffset(char* str, int i) {106int idris_utf8_findOffset(char* str, int i) {
107 int offset = 0;107 int offset = 0;
108 while(i > 0 && str != '\0') {108 while(i > 0 && *str != '\0') {
109 int len = idris_utf8_charlen(str);109 int len = idris_utf8_charlen(str);
110 str+=len;110 str+=len;
111 offset+=len;111 offset+=len;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t