Bug 1400148 - Don't use -1 to represent an unset nsCursor. r=karlt.
Because UBSan complains about casting -1: > runtime error: load of value 4294967295, which is not a valid value for type 'nsCursor'
This commit is contained in:
@@ -1012,7 +1012,7 @@ PuppetWidget::SetCursor(imgIContainer* aCursor,
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
mCursor = nsCursor(-1);
|
||||
mCursor = eCursorInvalid;
|
||||
mCustomCursor = aCursor;
|
||||
mCursorHotspotX = aHotspotX;
|
||||
mCursorHotspotY = aHotspotY;
|
||||
|
||||
Reference in New Issue
Block a user