strchr takes the lowest 8 bits of that only so 0x10a would appear as 0x0a making it segfault when doing the array access

Kudos to TheLemonMan