[gtkhtml] Error out if the cursor position becomes negative.
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkhtml] Error out if the cursor position becomes negative.
- Date: Thu, 15 Sep 2016 23:13:43 +0000 (UTC)
commit 7fa894650fee4c4c54eca4fbc8b79ff51f277b4d
Author: Federico Mena Quintero <federico gnome org>
Date: Tue Sep 13 12:52:21 2016 -0500
Error out if the cursor position becomes negative.
gtkhtml/htmlcursor.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gtkhtml/htmlcursor.c b/gtkhtml/htmlcursor.c
index c981563..b432b6d 100644
--- a/gtkhtml/htmlcursor.c
+++ b/gtkhtml/htmlcursor.c
@@ -70,6 +70,10 @@ debug_location (const HTMLCursor *cursor)
g_print ("Cursor in %s (%p), offset %d, position %d\n",
html_type_name (HTML_OBJECT_TYPE (object)),
(gpointer) object, cursor->offset, cursor->position);
+
+ if (cursor->position < 0) {
+ g_error ("error! cursor->position < 0");
+ }
}
#else
#define debug_location(cursor)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]