By initializing 'to' to a value, the code made it seem like that
value mattered. But the value is overwritten in getWord().
Further, now if 'to' is used before it is initialized, there might
be a useful compiler warning that could point to a bug.
{
LBUFERR(this == cur.text());
CursorSlice from = cur.top();
{
LBUFERR(this == cur.text());
CursorSlice from = cur.top();
- CursorSlice to = cur.top();
getWord(from, to, loc);
if (cur.top() != from)
setCursor(cur, from.pit(), from.pos());
getWord(from, to, loc);
if (cur.top() != from)
setCursor(cur, from.pit(), from.pos());