diff options
author | Arch Librarian <arch@canonical.com> | 2004-09-20 16:59:41 +0000 |
---|---|---|
committer | Arch Librarian <arch@canonical.com> | 2004-09-20 16:59:41 +0000 |
commit | cc99a10236616ca1b01e4bc3852a9c5257c69d48 (patch) | |
tree | 12160708a2102f4ed0e6360238d8ecc825360226 /apt-pkg/contrib/configuration.cc | |
parent | ff2a211aec45ac8c63ad60d75714da78d77ef69b (diff) |
Fix segfault in FindAny when /i is used, and there is n...
Author: doogie
Date: 2002-11-09 19:52:03 GMT
Fix segfault in FindAny when /i is used, and there is no default.
Diffstat (limited to 'apt-pkg/contrib/configuration.cc')
-rw-r--r-- | apt-pkg/contrib/configuration.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apt-pkg/contrib/configuration.cc b/apt-pkg/contrib/configuration.cc index 18d6cd9ab..b0d705b07 100644 --- a/apt-pkg/contrib/configuration.cc +++ b/apt-pkg/contrib/configuration.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: configuration.cc,v 1.24 2002/11/09 17:11:25 doogie Exp $ +// $Id: configuration.cc,v 1.25 2002/11/09 19:52:03 doogie Exp $ /* ###################################################################### Configuration Class @@ -282,7 +282,7 @@ string Configuration::FindAny(const char *Name,const char *Default) const case 'i': { char buf[16]; - snprintf(buf, sizeof(buf)-1, "%d", FindI(key, atoi(Default))); + snprintf(buf, sizeof(buf)-1, "%d", FindI(key, Default ? atoi(Default) : 0 )); return buf; } } |