diff options
author | Neil Moore <neil@s-z.org> | 2014-05-14 18:19:12 -0400 |
---|---|---|
committer | Neil Moore <neil@s-z.org> | 2014-05-14 18:19:12 -0400 |
commit | b5016f09339579df92a7a20505b0ace583cbba2d (patch) | |
tree | f30c7af69d43034803b963c293917eaecb9f19f4 /crawl-ref/source/hiscores.cc | |
parent | a22e8573f502b043288a04049dcda581e4b2a43c (diff) | |
download | crawl-ref-b5016f09339579df92a7a20505b0ace583cbba2d.tar.gz crawl-ref-b5016f09339579df92a7a20505b0ace583cbba2d.zip |
Improve a bad NUM_ enumerator.
Cardinals can't be negative, silly! And it definitely shouldn't overlap.
Diffstat (limited to 'crawl-ref/source/hiscores.cc')
-rw-r--r-- | crawl-ref/source/hiscores.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crawl-ref/source/hiscores.cc b/crawl-ref/source/hiscores.cc index 26c0a16043..0412c8b1b4 100644 --- a/crawl-ref/source/hiscores.cc +++ b/crawl-ref/source/hiscores.cc @@ -813,7 +813,7 @@ enum old_job_type OLD_JOB_STALKER = -5, OLD_JOB_JESTER = -6, OLD_JOB_PRIEST = -7, - NUM_OLD_JOBS + NUM_OLD_JOBS = -OLD_JOB_PRIEST }; static const char* _job_name(int job) @@ -875,7 +875,7 @@ static int _job_by_name(const string& name) if (job != JOB_UNKNOWN) return job; - for (job = -1; job > NUM_OLD_JOBS - 2; job--) + for (job = -1; job >= -NUM_OLD_JOBS; job--) if (name == _job_name(job)) return job; |