chiark / gitweb /
terminal: fix tile-offset calculation
authorDavid Herrmann <dh.herrmann@gmail.com>
Tue, 23 Sep 2014 11:38:09 +0000 (13:38 +0200)
committerDavid Herrmann <dh.herrmann@gmail.com>
Tue, 23 Sep 2014 18:05:44 +0000 (20:05 +0200)
commitb4170aed36e667e52ce4a353bda1964e3872ab34
treea85852cf4a619c6782224dd7e86cc18c310bcd01
parentce540a24d53e1751a5b69224d5a7f5a59f2de7ad
terminal: fix tile-offset calculation

Binary operators with two pointers as arguments always operate on
object-size, not bytes. That is, "int *a, *b", (a - b) calculates the
number of integers between b and a, not the number of bytes.

Fix our cache-offset calculation to not use sizeof() with full-ptr
arithmetic.
src/libsystemd-terminal/grdev.c