Two bug fixes, Mouse1+E crash, and setnext in SP crash

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6969 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Ronald Reagan
2012-12-11 20:52:57 +00:00
parent 69f8ea1c63
commit ca838cd760
2 changed files with 6 additions and 2 deletions
+2 -2
View File
@@ -125,10 +125,10 @@ void checkselections()
// update current selection, or add a new one
void makesel(bool isnew)
{
if(isnew) addselection(min(lastx, cx), min(lasty, cy), abs(lastx-cx)+1, abs(lasty-cy)+1, max(lasth, ch));
block &cursel = sels.last(); //RR 10/12/12 - FIXEME, error checking should happen with "isnew", not here checking if it really is new.
if(isnew || sels.length() == 0) addselection(min(lastx, cx), min(lasty, cy), abs(lastx-cx)+1, abs(lasty-cy)+1, max(lasth, ch));
else
{
block &cursel = sels.last();
cursel.x = min(lastx, cx); cursel.y = min(lasty, cy);
cursel.xs = abs(lastx-cx)+1; cursel.ys = abs(lasty-cy)+1;
cursel.h = max(lasth, ch);