// vga_restore_rm0wm0();\r
if(elapsed_timer(gv) >= (1.0 / gv->kurokku.frames_per_second))\r
{\r
- sprintf(gv->pee, "%.0f fps", (double)gv->kurokku.tiku/ticktock(gv));\r
+ // NTS: For some bizarre reason, gv->pee is not initialized, but the pointer is not NULL even\r
+ // though it should be. Instead it's NULL as a near pointer but contains a non-null\r
+ // segment value, so testing against NULL doesn't work. It is initialized properly if\r
+ // you call start_timer() though which uses near malloc. Rather than fight with that,\r
+ // I decided it would be better to declare a temp buffer statically and sprintf to that.\r
+ //\r
+ // This fixes *** Null pointer assignment detected error message in ZCROLL.EXE on exit.\r
+ sprintf(global_temp_status_text, "%.0f fps", (double)gv->kurokku.tiku/ticktock(gv));\r
//modexClearRegion(&(gv->video.page[shinku_fps_indicator_page]), x, y, w, h, 45);\r
- modexprint(&(gv->video.page[/*!*/(gv->video.p)]), x, y, type, col, bgcol, gv->pee);\r
+ modexprint(&(gv->video.page[/*!*/(gv->video.p)]), x, y, type, col, bgcol, global_temp_status_text);\r
gv->kurokku.tiku=0;\r
/* block copy to visible RAM from offscreen */\r
// vga_setup_wm1_block_copy();\r