fix uninitialized memory error in mesh_build()

- manifested on 32 bit platforms