aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/makedict/BinaryDictEncoderUtils.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2013-09-19 13:43:09 +0900
committerJean Chalard <jchalard@google.com>2013-09-19 13:43:09 +0900
commita7d0ab80a043f222f0e781dc8070cd0d68422b64 (patch)
treeb624a60af5fcd09dc70de63620996f6571cf68e9 /java/src/com/android/inputmethod/latin/makedict/BinaryDictEncoderUtils.java
parent8678062853291f46ea0b994375b251b6604c42a6 (diff)
downloadlatinime-a7d0ab80a043f222f0e781dc8070cd0d68422b64.tar.gz
latinime-a7d0ab80a043f222f0e781dc8070cd0d68422b64.tar.xz
latinime-a7d0ab80a043f222f0e781dc8070cd0d68422b64.zip
Fix an off-by-one error.
These variables were meant to represent the (x,y) coordinate of the last pixel of the grid, to avoid going one pixel too far. But the last pixel of the grid, of course, has coord (width - 1, height - 1). This bug only ever happens in a rare case because to reproduce, it needs the right (resp. bottom) coordinate of the rightmost (resp. bottommost) plus the threshold plus half the grid width (resp. height) to be exactly the number of pixels of the grid, which is pretty unlikely... unless there are more tiles in the grid than pixels on the screen, in which case the grid width is 1 and this becomes likely. This fixes the fencepost error and renames the variables to clarify their meaning. Bug: 10537485 Change-Id: Iecfe2c0f29ee17776ee2cceaa4b1db722276b1f3
Diffstat (limited to 'java/src/com/android/inputmethod/latin/makedict/BinaryDictEncoderUtils.java')
0 files changed, 0 insertions, 0 deletions