[Libreoffice-commits] online.git: loleaflet/src
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Apr 24 14:05:27 UTC 2019
loleaflet/src/control/Control.LokDialog.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit a97b592b30dcafd228e8cd32e93066777c8718d1
Author: Henry Castro <hcastro at collabora.com>
AuthorDate: Wed Apr 24 00:31:08 2019 -0400
Commit: Henry Castro <hcastro at collabora.com>
CommitDate: Wed Apr 24 16:05:10 2019 +0200
loleaflet: validate that the rectangle coordinates (x, y) belongs to ZxZ
Change-Id: Ibbb1cf1416ec441f1e3d4baaf6fdf6f47ab6041c
Reviewed-on: https://gerrit.libreoffice.org/71150
Reviewed-by: Henry Castro <hcastro at collabora.com>
Tested-by: Henry Castro <hcastro at collabora.com>
diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js
index ce6940698..4222800ec 100644
--- a/loleaflet/src/control/Control.LokDialog.js
+++ b/loleaflet/src/control/Control.LokDialog.js
@@ -170,7 +170,7 @@ L.Control.LokDialog = L.Control.extend({
_isRectangleValid: function(rect) {
rect = rect.split(',');
- return (parseInt(rect[0]) >= 0 && parseInt(rect[1]) >= 0 &&
+ return (!isNaN(parseInt(rect[0])) && !isNaN(parseInt(rect[1])) &&
parseInt(rect[2]) >= 0 && parseInt(rect[3]) >= 0);
},
More information about the Libreoffice-commits
mailing list