Showing the changes to src/core/chuck_utils.cpp (1 of 24 files). Show all
Unified · Split
| @@ -58,7 +58,8 @@ void * checked_malloc( int len ) · 57 unmodified lines | ||
| 58 | 58 | |
| 59 | 59 | c_str cc_str( char * s ) |
| 60 | 60 | { |
| 61 | − c_str p = (c_str)checked_malloc( strlen(s)+1 ); | |
| 61 | + t_CKINT len = strlen(s) + 1; | |
| 62 | + c_str p = (c_str)checked_malloc( len ); | |
| 62 | 63 | strcpy( p, s ); |
| 63 | 64 | |
| 64 | 65 | return p; |