diff options
author | Rocco Rutte <pdmef@gmx.net> | 2009-06-01 11:26:37 +0200 |
---|---|---|
committer | Rocco Rutte <pdmef@gmx.net> | 2009-06-01 11:26:37 +0200 |
commit | 547b25a21660416bfb3ff49e173a9eb469fff779 (patch) | |
tree | 57189703c13f2c8ce953ef23eac697dbfcd10c68 /main.c | |
parent | 7444e911d87a59834b9e36e3668cc1dfd9905f2b (diff) |
Use strtol() wrappers for most atoi() calls
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -631,7 +631,11 @@ int main (int argc, char **argv) case 'd': #ifdef DEBUG - debuglevel = atoi (optarg); + if (mutt_atoi (optarg, &debuglevel) < 0 || debuglevel <= 0) + { + fprintf (stderr, _("Error: value '%s' is invalid for -d.\n"), optarg); + return 1; + } printf (_("Debugging at level %d.\n"), debuglevel); #else printf _("DEBUG was not defined during compilation. Ignored.\n"); |