Skip to content

Commit

Permalink
Fix the last change
Browse files Browse the repository at this point in the history
  • Loading branch information
ueno committed Mar 6, 2014
1 parent 9eebfd5 commit ee275be
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
5 changes: 3 additions & 2 deletions libkkc/key-event.vala
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,9 @@ namespace Kkc {
elements.add (null); // make sure that strv ends with null
// newer valac thinks null in a fixed length array as
// an empty string
elements.length = -1;
return "(" + string.joinv (" ", elements.to_array ()) + ")";
var array = elements.to_array ();
array.length = -1;
return "(" + string.joinv (" ", array) + ")";
} else {
return _base;
}
Expand Down
10 changes: 5 additions & 5 deletions libkkc/user-sentence-dictionary.vala
Original file line number Diff line number Diff line change
Expand Up @@ -254,13 +254,13 @@ namespace Kkc {

// Make sure to null terminate so joinv determine the end of strv.
input.add (null);

// Newer valac thinks null in a fixed length array as an
// empty string.
input.length = -1;
constraint_entries.set (string.joinv ("", input.to_array ()),
constraint);
phrase_entries.set (string.joinv (" ", input.to_array ()),
phrase);
var array = input.to_array ();
array.length = -1;
constraint_entries.set (string.joinv ("", array), constraint);
phrase_entries.set (string.joinv (" ", array), phrase);
is_dirty = true;
return true;
}
Expand Down

0 comments on commit ee275be

Please sign in to comment.