#include <common.h>
#include <wm_internals.h>
#include <stdlib.h>
-#include <utf8.h>
+#include <unicode.h>
+#include <limits.h> // INT_MAX
// === TYPES ===
typedef struct sGlyph tGlyph;
prev = next, next = next->Next
);
- if( next->Codepoint == Codepoint )
+ if( next && next->Codepoint == Codepoint )
return next;
}
prev && prev->Codepoint > Codepoint;
next = prev, prev = prev->Prev
);
- if( prev->Codepoint == Codepoint )
+ if( prev && prev->Codepoint == Codepoint )
return prev;
}
}