Showing the changes to src/core/chuck_shell.cpp (1 of 37 files). Show all
Unified · Split
| @@ -564,7 +564,7 @@ void Chuck_Shell::continue_code( string & in ) · 563 unmodified lines | ||
| 564 | 564 | #ifndef __PLATFORM_WIN32__ |
| 565 | 565 | snprintf( buf, 16, "code %2d> ", (int)scope ); |
| 566 | 566 | #else |
| 567 | − sprintf( buf, "code %2ld> ", (long)scope); | |
| 567 | + snprintf( buf, 16, "code %2ld> ", (long)scope); | |
| 568 | 568 | #endif |
| 569 | 569 | prompt = buf; |
| 570 | 570 | } |
| @@ -577,7 +577,7 @@ void Chuck_Shell::continue_code( string & in ) · 6 unmodified lines | ||
| 577 | 577 | #ifndef __PLATFORM_WIN32__ |
| 578 | 578 | snprintf( buf, 16, "code %2d> ", (int)scope ); |
| 579 | 579 | #else |
| 580 | − sprintf( buf, "code %2ld> ", (long)scope); | |
| 580 | + snprintf( buf, 16, "code %2ld> ", (long)scope); | |
| 581 | 581 | #endif |
| 582 | 582 | prompt = buf; |
| 583 | 583 | } |
| @@ -1005,7 +1005,7 @@ t_CKBOOL Chuck_Shell_Network_VM::kill( string & out ) · 421 unmodified lines | ||
| 1005 | 1005 | string Chuck_Shell_Network_VM::fullname() |
| 1006 | 1006 | { |
| 1007 | 1007 | char buf[16]; |
| 1008 | − sprintf( buf, ":%u", (int)port ); | |
| 1008 | + snprintf( buf, 16, ":%u", (int)port ); | |
| 1009 | 1009 | |
| 1010 | 1010 | return hostname + buf; |
| 1011 | 1011 | } |
| @@ -1388,7 +1388,7 @@ t_CKINT Chuck_Shell::Command_Ls::execute( vector< string > & argv, · 376 unmodified lines | ||
| 1388 | 1388 | return 0; |
| 1389 | 1389 | } |
| 1390 | 1390 | |
| 1391 | − int i, len = argv.size(); | |
| 1391 | + t_CKINT i, len = argv.size(); | |
| 1392 | 1392 | t_CKBOOL print_parent_name = len > 1 ? TRUE : FALSE; |
| 1393 | 1393 | |
| 1394 | 1394 | for( i = 0; i < len; i++ ) |
| @@ -1889,7 +1889,7 @@ t_CKINT Chuck_Shell::Command_VMAdd::execute( vector< string > & argv, · 494 unmodified lines | ||
| 1889 | 1889 | #ifndef __PLATFORM_WIN32__ |
| 1890 | 1890 | snprintf( buf, 16, "%lu", caller->vms.size() - 1 ); |
| 1891 | 1891 | #else |
| 1892 | − sprintf( buf, "%lu", (long)caller->vms.size() - 1 ); | |
| 1892 | + snprintf( buf, 16, "%lu", (long)caller->vms.size() - 1 ); | |
| 1893 | 1893 | #endif // __PLATFORM_WIN32__ |
| 1894 | 1894 | |
| 1895 | 1895 | out += caller->current_vm->fullname() + " saved as VM " + buf + "\n"; |
| @@ -1987,7 +1987,7 @@ t_CKINT Chuck_Shell::Command_VMList::execute( vector< string > & argv, · 91 unmodified lines | ||
| 1987 | 1987 | #ifndef __PLATFORM_WIN32__ |
| 1988 | 1988 | snprintf( buf, 16, "%lu", i ); |
| 1989 | 1989 | #else |
| 1990 | − sprintf( buf, "%lu", (long)i ); | |
| 1990 | + snprintf( buf, 16, "%lu", (long)i ); | |
| 1991 | 1991 | #endif // __PLATFORM_WIN32__ |
| 1992 | 1992 | out += string( "VM " ) + buf + ": " + |
| 1993 | 1993 | caller->vms[i]->fullname() + "\n"; |