Fixed float comparson

This commit is contained in:
akallabeth 2022-06-29 14:18:36 +02:00 committed by akallabeth
parent 684ada9c0e
commit e07233ccef
2 changed files with 5 additions and 2 deletions

View File

@ -28,6 +28,9 @@
#include <X11/Xcursor/Xcursor.h>
#endif
#include <float.h>
#include <math.h>
#include <winpr/crt.h>
#include <winpr/assert.h>
@ -320,7 +323,7 @@ static BOOL _xf_Pointer_GetCursorForCurrentScale(rdpContext* context, rdpPointer
}
ci.pixels = (XcursorPixel*)tmp;
if (xscale != 1 || yscale != 1)
if (((fabs(xscale) - 1.0) > DBL_EPSILON) || ((fabs(yscale) - 1.0) > DBL_EPSILON))
{
if (!freerdp_image_scale((BYTE*)ci.pixels, CursorFormat, 0, 0, 0, ci.width, ci.height,
(BYTE*)xpointer->cursorPixels, CursorFormat, 0, 0, 0,

View File

@ -285,7 +285,7 @@ const char* mcs_domain_pdu_string(DomainMCSPDU pdu)
return "DomainMCSPDU_enum_length";
default:
return "DomainMCSPDU_UNKNOWN";
};
}
}
static BOOL mcs_merge_domain_parameters(DomainParameters* targetParameters,
DomainParameters* minimumParameters,