Resolve an endianness comparison bug in C file factory.c