Skip to content

Commit

Permalink
Fixing infinite loop reading a comment
Browse files Browse the repository at this point in the history
Minor renaming too.
  • Loading branch information
CodyDWJones committed Jun 6, 2017
1 parent b4f9aa9 commit 442e2bf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
8 changes: 4 additions & 4 deletions includes/acl/clip_reader/clip_reader.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ namespace acl

return true;

error:
error:
m_error = m_parser.get_error();
return false;
}
Expand Down Expand Up @@ -228,7 +228,7 @@ namespace acl
return true;
}

int parent_index = index_of_bone_name(src.parent, src.parent_length);
int parent_index = index_of_bone(src.parent, src.parent_length);
if (parent_index < 0)
{
set_error(ClipReaderError::NoParentWithThatName);
Expand All @@ -254,7 +254,7 @@ namespace acl
return false;
}

int index_of_bone_name(const char* const name, const int name_length)
int index_of_bone(const char* const name, const int name_length)
{
const char* bone_name = m_bone_names;

Expand Down Expand Up @@ -374,7 +374,7 @@ namespace acl
goto error;
}

int bone_index = index_of_bone_name(name, name_length);
int bone_index = index_of_bone(name, name_length);
if (bone_index < 0)
{
set_error(ClipReaderError::NoBoneWithThatName);
Expand Down
3 changes: 1 addition & 2 deletions includes/acl/sjson/sjson_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ namespace acl
bool peek_if_array_ends()
{
State s = save_state();
m_state.peeking = true;
bool result = array_ends();
restore_state(s);
return result;
Expand Down Expand Up @@ -235,7 +234,6 @@ namespace acl
int line{ 1 };
int column{ 1 };
char symbol;
bool peeking{};

SJSONParserError error{};
};
Expand Down Expand Up @@ -357,6 +355,7 @@ namespace acl
}
else
{
advance();
wasAsterisk = false;
}
}
Expand Down

0 comments on commit 442e2bf

Please sign in to comment.