https://github.com/gingerBill/gb/blob/master/gb.h#L7957-L7959 Pretty sure this always produces incorrect results since libc functions return 0 on success.