diff --git a/bad_alloc.cc b/bad_alloc.cc --- a/bad_alloc.cc +++ b/bad_alloc.cc @@ -19,6 +19,7 @@ rlim.rlim_max = 1.25 * megs; if (megs > (4 * 1024 * 1024)) return setrlimit (RLIMIT_AS, &rlim); + return EXIT_FAILURE; } @@ -41,7 +42,7 @@ cout << e.what () << " after " << i << " iterations" << endl << endl; cout << "Would you like to see the full error message? (y/n) "; cin >> action; - v.resize(0); + v.clear(); switch (action) { case 'y': throw;