Skip to content

Commit

Permalink
Incorrect handling of types causes a segfault on
Browse files Browse the repository at this point in the history
armv7l (e.g., Raspberry Pi)

#1423

make units is passed.
  • Loading branch information
wbkang committed May 31, 2017
1 parent 4b9aa92 commit 4c423b7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion main/parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ extern int defineLanguageKind (const langType language, kindDefinition *def,
return defineKind (LanguageTable [language].kindControlBlock, def, freeKindDef);
}

extern kindDefinition* getLanguageKind (const langType language, char kindIndex)
extern kindDefinition* getLanguageKind (const langType language, signed char kindIndex)
{
kindDefinition* kdef;

Expand Down
3 changes: 2 additions & 1 deletion main/parse.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,9 @@ extern parserDefinition* parserNew (const char* name);
extern bool doesLanguageAllowNullTag (const langType language);
extern bool doesLanguageRequestAutomaticFQTag (const langType language);
extern const char *getLanguageName (const langType language);
/* kindIndex has to be explicitly signed because char is not signed in all platforms. */
extern kindDefinition* getLanguageKindForLetter (const langType language, char kindLetter);
extern kindDefinition* getLanguageKind(const langType language, char kindIndex);
extern kindDefinition* getLanguageKind(const langType language, signed char kindIndex);
extern int defineLanguageKind (const langType language, kindDefinition *def,
freeKindDefFunc freeKindDef);
extern langType getNamedLanguage (const char *const name, size_t len);
Expand Down

0 comments on commit 4c423b7

Please sign in to comment.