>>442
ありがとうございました。下記のように変えたらやりたかった通りの処理になりました。

fputs(g_mapdata[y], pFile); 
       ↓
fwrite(g_mapdata[y], sizeof(char), g_stagedata.mapwidth, pFile);
fputs("\n", pFile);