diff options
| author | Philip Heron <phil@sanslogic.co.uk> | 2020-07-05 12:44:07 +0100 |
|---|---|---|
| committer | Philip Heron <phil@sanslogic.co.uk> | 2020-07-05 12:44:07 +0100 |
| commit | 3122b35260b975e982f3b085887e04409a247e43 (patch) | |
| tree | eb9cd0887d4f4c44a69835fa382bdbe0db41c153 | |
| parent | 2b79a2f65145222858f58de309fe768db861082a (diff) | |
Silence strncpy() warning when copying the callsign string
| -rw-r--r-- | main.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -72,7 +72,8 @@ int main(int argc, char *argv[]) case 'c': if(strlen(optarg) > 6) fprintf(stderr, "Warning: callsign is longer than 6 characters.\n"); - strncpy(callsign, optarg, 7); + strncpy(callsign, optarg, 6); + callsign[6] = '\0'; break; case 'i': image_id = atoi(optarg); break; case 'q': quality = atoi(optarg); break; |
