Skip to content

Commit

Permalink
Eluna fixes #14
Browse files Browse the repository at this point in the history
  • Loading branch information
Rochet2 authored and Salja committed Dec 28, 2013
1 parent 3ae1155 commit 7e8581f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/shared/Database/DBCStore.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class DBCStorage
explicit DBCStorage(const char* f) : nCount(0), fieldCount(0), fmt(f), indexTable(NULL), m_dataTable(NULL) { }
~DBCStorage() { Clear(); }

uint32 GetNumRows() const { return nCount; }
uint32 GetNumRows() const { return loaded ? data.size() : nCount; }
char const* GetFormat() const { return fmt; }
uint32 GetFieldCount() const { return fieldCount; }

Expand Down Expand Up @@ -67,7 +67,7 @@ class DBCStorage
{
if(!loaded)
{
for (uint32 i = 0; i < GetNumRows(); ++i)
for (uint32 i = 0; i < nCount; ++i)
{
T const* node = LookupEntry(i);
if (!node)
Expand All @@ -76,8 +76,6 @@ class DBCStorage
}
loaded = true;
}
if (id > nCount)
nCount = id+1;
data[id] = t;
}

Expand Down

0 comments on commit 7e8581f

Please sign in to comment.