Corrected a small logical mistake in Shareware-HAM recognition

This commit is contained in:
zicodxx 2008-11-20 12:29:48 +00:00
parent 8f41e552d2
commit 74fd36d2f9
2 changed files with 8 additions and 5 deletions

View file

@ -3,6 +3,7 @@ D2X-Rebirth Changelog
20081120
--------
main/ai2.c: When we reached MAX_BOSS_TELEPORT_SEGS in init_boss_segments, make sure we also escape out of the for-loop - otherwise we still might overflow
main/piggy.c: Corrected a small logical mistake in Shareware-HAM recognition
20081119
--------

View file

@ -953,17 +953,19 @@ int read_hamfile()
ham_fp = PHYSFSX_openDataFile(DEFAULT_HAMFILE_REGISTERED);
if (!ham_fp)
{
ham_fp = PHYSFSX_openDataFile(DEFAULT_HAMFILE_SHAREWARE);
if (ham_fp)
{
shareware = 1;
GameArg.SndDigiSampleRate = SAMPLE_RATE_11K;
}
}
if (ham_fp == NULL) {
Must_write_hamfile = 1;
return 0;
}
else
{
shareware = 1;
GameArg.SndDigiSampleRate = SAMPLE_RATE_11K;
}
//make sure ham is valid type file & is up-to-date
ham_id = cfile_read_int(ham_fp);