summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-11-27 09:25:53 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-11-27 09:25:53 +0200
commit10f11a8d13c808713f979557a5c96fcaadacf92e (patch)
tree186cd85321d99bea6ca5d448355da4df89baac0f /src/ui
parent8c19bf99fe2c4a9c7b31bb32d44b374516bff245 (diff)
DocumentWidget: Check for invalid deserialized URL
Should check for stray pointers in URL, mostly to assist development use. Normally the "open" command arguments never have a pointer appended.
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/documentwidget.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c
index ac07304d..a0dcb863 100644
--- a/src/ui/documentwidget.c
+++ b/src/ui/documentwidget.c
@@ -86,6 +86,10 @@ void serialize_PersistentDocumentState(const iPersistentDocumentState *d, iStrea
86 86
87void deserialize_PersistentDocumentState(iPersistentDocumentState *d, iStream *ins) { 87void deserialize_PersistentDocumentState(iPersistentDocumentState *d, iStream *ins) {
88 deserialize_String(d->url, ins); 88 deserialize_String(d->url, ins);
89 if (indexOfCStr_String(d->url, " ptr:0x") != iInvalidPos) {
90 /* Oopsie, this should not have been written; invalid URL. */
91 clear_String(d->url);
92 }
89 /*d->zoomPercent =*/ read16_Stream(ins); 93 /*d->zoomPercent =*/ read16_Stream(ins);
90 deserialize_History(d->history, ins); 94 deserialize_History(d->history, ins);
91} 95}