mirror of https://github.com/axmolengine/axmol.git
Fixing compilation errors for linux port.
This commit is contained in:
parent
f0b792eb2d
commit
8c779ff98f
|
@ -58,7 +58,7 @@ Skeleton* Skeleton_create (SkeletonData* data) {
|
|||
SlotData *slotData = data->slots[i];
|
||||
|
||||
/* Find bone for the slotData's boneData. */
|
||||
Bone *bone;
|
||||
Bone *bone = NULL;
|
||||
for (ii = 0; ii < self->boneCount; ++ii) {
|
||||
if (data->bones[ii] == slotData->boneData) {
|
||||
bone = self->bones[ii];
|
||||
|
|
|
@ -59,8 +59,9 @@ char* _readFile (const char* path, int* length) {
|
|||
fseek(file, 0, SEEK_SET);
|
||||
|
||||
char* data = MALLOC(char, *length);
|
||||
fread(data, 1, *length, file);
|
||||
int rtn = fread(data, 1, *length, file);
|
||||
fclose(file);
|
||||
if (rtn != *length) return 0;
|
||||
|
||||
return data;
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ extern "C"
|
|||
int cocos2dx_lua_loader(lua_State *L)
|
||||
{
|
||||
std::string filename(luaL_checkstring(L, 1));
|
||||
int pos = filename.rfind(".lua");
|
||||
size_t pos = filename.rfind(".lua");
|
||||
if (pos != std::string::npos)
|
||||
{
|
||||
filename = filename.substr(0, pos);
|
||||
|
|
Loading…
Reference in New Issue