Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6670,4 +6670,4 @@ void reselectEntityGroup()
int generateDungeon(char* levelset, Uint32 seed, std::tuple<int, int, int> mapParameters)
{
return 0; // dummy function
}
}
4 changes: 3 additions & 1 deletion src/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,14 @@
#include "player.hpp"
#include <limits>

#if defined(LINUX) || defined(APPLE)
#include <sys/stat.h>
#endif
#ifdef LINUX
//Sigsegv catching stuff.
#include <signal.h>
#include <string.h>
#include <execinfo.h>
#include <sys/stat.h>

const unsigned STACK_SIZE = 10;

Expand Down
6 changes: 5 additions & 1 deletion src/init_game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ int initGame()
std::string itemsDirectory = PHYSFS_getRealDir("items/items.txt");
itemsDirectory.append(PHYSFS_getDirSeparator()).append("items/items.txt");
fp = openDataFile(itemsDirectory.c_str(), "r");
for ( c = 0; !feof(fp); ++c )
for ( c = 0; c < NUMITEMS; ++c )
{
if ( c > ARTIFACT_BOW )
{
Expand All @@ -169,6 +169,10 @@ int initGame()
items[c].name_identified = language[1545 + c * 2];
items[c].name_unidentified = language[1546 + c * 2];
}
items[c].index = items[c].fpindex = items[c].variations = 1;

if (feof(fp))
continue;
fscanf(fp, "%d", &items[c].index);
while ( fgetc(fp) != '\n' ) if ( feof(fp) )
{
Expand Down