File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -705,15 +705,17 @@ float MotionEvent::getAxisValue(int32_t axis, size_t pointerIndex) const {
705705const PointerCoords* MotionEvent::getHistoricalRawPointerCoords (
706706 size_t pointerIndex, size_t historicalIndex) const {
707707 if (CC_UNLIKELY (pointerIndex < 0 || pointerIndex >= getPointerCount ())) {
708- LOG (FATAL) << __func__ << " : Invalid pointer index " << pointerIndex << " for " << *this ;
708+ LOG (FATAL) << __func__ << " : Invalid pointer index " << pointerIndex
709+ << " ; should be between >0 and ≤" << getPointerCount ();
709710 }
710711 if (CC_UNLIKELY (historicalIndex < 0 || historicalIndex > getHistorySize ())) {
711- LOG (FATAL) << __func__ << " : Invalid historical index " << historicalIndex << " for "
712- << * this ;
712+ LOG (FATAL) << __func__ << " : Invalid historical index " << historicalIndex
713+ << " ; should be >0 and ≤ " << getHistorySize () ;
713714 }
714715 const size_t position = historicalIndex * getPointerCount () + pointerIndex;
715716 if (CC_UNLIKELY (position < 0 || position >= mSamplePointerCoords .size ())) {
716- LOG (FATAL) << __func__ << " : Invalid array index " << position << " for " << *this ;
717+ LOG (FATAL) << __func__ << " : Invalid array index " << position << " ; should be >0 and ≤"
718+ << mSamplePointerCoords .size ();
717719 }
718720 return &mSamplePointerCoords [position];
719721}
You can’t perform that action at this time.
0 commit comments