Skip to content

Commit

Permalink
fix(SquirrelPanel): use of uninitialized local variable linear, vertical
Browse files Browse the repository at this point in the history
maybe fixes #513

#513 can sometimes be reproduced by using Squirrel after:
rm ~/Library/Rime/build/squirrel.yaml; Squirrel --quit
  • Loading branch information
lotem committed Feb 13, 2021
1 parent 655209a commit e8b87a4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions SquirrelPanel.m
Original file line number Diff line number Diff line change
Expand Up @@ -1278,8 +1278,8 @@ -(void)loadConfig:(SquirrelConfig *)config forDarkMode:(BOOL)isDark {
}

+(void)updateTheme:(SquirrelTheme *)theme withConfig:(SquirrelConfig *)config forDarkMode:(BOOL)isDark {
BOOL linear;
BOOL vertical;
BOOL linear = NO;
BOOL vertical = NO;
updateCandidateListLayout(&linear, config, @"style");
updateTextOrientation(&vertical, config, @"style");
BOOL inlinePreedit = [config getBool:@"style/inline_preedit"];
Expand Down Expand Up @@ -1619,6 +1619,6 @@ +(void)updateTheme:(SquirrelTheme *)theme withConfig:(SquirrelConfig *)config fo
inlinePreedit:inlinePreedit];

theme.native = isNative;
[theme setCandidateFormat: (candidateFormat ? candidateFormat : kDefaultCandidateFormat)];
theme.candidateFormat = (candidateFormat ? candidateFormat : kDefaultCandidateFormat);
}
@end

1 comment on commit e8b87a4

@GJRobert
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for this. I don't have to modify my schema style setting then.

Please sign in to comment.