Mercurial > dwindows
comparison dwtest.c @ 1741:1b3b059a74b1
Unsafe use of sprintf() in dwtest may have been causing stack overruns on Win2k.
Removed it since it is completely unnecessary and can be done directly through
dw_messagebox() these days. This must have been some insanely old code.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Fri, 01 Jun 2012 23:05:21 +0000 |
parents | d93e860c38d1 |
children | 535e8c19a13d |
comparison
equal
deleted
inserted
replaced
1740:2d44ca344863 | 1741:1b3b059a74b1 |
---|---|
568 return 0; | 568 return 0; |
569 } | 569 } |
570 | 570 |
571 int DWSIGNAL helpabout_callback(HWND window, void *data) | 571 int DWSIGNAL helpabout_callback(HWND window, void *data) |
572 { | 572 { |
573 char buf[100]; | |
574 DWEnv env; | 573 DWEnv env; |
575 | 574 |
576 dw_environment_query(&env); | 575 dw_environment_query(&env); |
577 sprintf( buf, "dwindows test\n\nOS: %s %s %s Version: %d.%d.%d.%d\n\ndwindows Version: %d.%d.%d", | 576 dw_messagebox( "About dwindows", DW_MB_OK | DW_MB_INFORMATION, "dwindows test\n\nOS: %s %s %s Version: %d.%d.%d.%d\n\ndwindows Version: %d.%d.%d", |
578 env.osName, env.buildDate, env.buildTime, | 577 env.osName, env.buildDate, env.buildTime, |
579 env.MajorVersion, env.MinorVersion, env.MajorBuild, env.MinorBuild, | 578 env.MajorVersion, env.MinorVersion, env.MajorBuild, env.MinorBuild, |
580 env.DWMajorVersion, env.DWMinorVersion, env.DWSubVersion ); | 579 env.DWMajorVersion, env.DWMinorVersion, env.DWSubVersion ); |
581 dw_messagebox( "About dwindows", DW_MB_OK | DW_MB_INFORMATION, buf ); | |
582 return 0; | 580 return 0; |
583 } | 581 } |
584 | 582 |
585 int DWSIGNAL exit_callback(HWND window, void *data) | 583 int DWSIGNAL exit_callback(HWND window, void *data) |
586 { | 584 { |