diff options
author | rubidium <rubidium@openttd.org> | 2009-07-31 13:25:20 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-07-31 13:25:20 +0000 |
commit | 097e79a86de967c416d71d934a325d883d917fd5 (patch) | |
tree | 5a6a23be557b11e2963262c88946b7791343920b /src/openttd.cpp | |
parent | c2fdb85c0dce9cfa61045ccee16052f0e31d7078 (diff) | |
download | openttd-097e79a86de967c416d71d934a325d883d917fd5.tar.xz |
(svn r17001) -Codechange: replace some more assert(0)s to NOT_REACHED() and document why they (assert(0)) have to stay for the remaining cases.
Diffstat (limited to 'src/openttd.cpp')
-rw-r--r-- | src/openttd.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp index 962a05143..df2996b1a 100644 --- a/src/openttd.cpp +++ b/src/openttd.cpp @@ -116,6 +116,8 @@ void CDECL error(const char *s, ...) ShowOSErrorBox(buf, true); if (_video_driver != NULL) _video_driver->Stop(); + /* Don't go into NOT_REACHED here; NOT_REACHED is using error, so + * using it would result in an infinite loop instead of errors. */ assert(0); exit(1); } |