diff options
author | David <dbphillipsnz@gmail.com> | 2014-09-27 13:03:09 +1200 |
---|---|---|
committer | David <dbphillipsnz@gmail.com> | 2014-09-27 13:03:09 +1200 |
commit | 3ac35c199e59585bd3c9e8348c5f4b5a7137ff41 (patch) | |
tree | 12fc88b1b30f42b6932cd0a076dc3456868587d7 /common.c | |
parent | d7de3b282bb6c9bb675785c08d3858c14381a209 (diff) | |
download | paramano-3ac35c199e59585bd3c9e8348c5f4b5a7137ff41.tar.xz |
Fixed bug affecting CPUs with multiple cores
Diffstat (limited to 'common.c')
-rw-r--r-- | common.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -93,3 +93,14 @@ int get_int(const char* string) return atoi(first_num); } + + +/*********************************************************************** + * Replace occurrences of \n from end of string with \0 + **********************************************************************/ +void chomp(char* string) +{ + int i; + for (i = strlen(string)-1; (i >= 0 && string[i] == '\n'); i--) + string[i] = '\0'; +} |