Fix for overflow exception
Fix for overflow exception

if x and y are both -1, the packed integer is 0xFFFFFFFF which is not a valid Int32, thus an overflow exception is thrown in IntPtr.ToInt32().
p76984275/MahApps.Metro,Jack109/MahApps.Metro,batzen/MahApps.Metro,xxMUROxx/MahApps.Metro,psinl/MahApps.Metro,Danghor/MahApps.Metro,jumulr/MahApps.Metro,ye4241/MahApps.Metro,chuuddo/MahApps.Metro,MahApps/MahApps.Metro,Evangelink/MahApps.Metro,pfattisc/MahApps.Metro