Fixed small bug in the mapdriver-test.c
Caught a major bug in write