From 15172fef407ef05936f7189bf8c7e6630b4dcad0 Mon Sep 17 00:00:00 2001 From: cdelaunay Date: Tue, 13 Feb 2024 14:03:51 +0100 Subject: [PATCH] cleaning fix --- .../ZnUrl.class/instance/parseFrom.defaultScheme..st | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/parseFrom.defaultScheme..st b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/parseFrom.defaultScheme..st index 88ea831a..9ceb9315 100644 --- a/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/parseFrom.defaultScheme..st +++ b/repository/Zinc-Resource-Meta-Core.package/ZnUrl.class/instance/parseFrom.defaultScheme..st @@ -1,13 +1,12 @@ parsing parseFrom: string defaultScheme: defaultScheme - | start end index fragmentIndex| + | start end index | start := 1. end := string size. - fragmentIndex := string indexOf: $#. - (fragmentIndex) > 0 + (index := string indexOf: $#) > 0 ifTrue: [ - self fragment: (self decodePercent: (string copyFrom: fragmentIndex + 1 to: end)). - end := fragmentIndex - 1 ]. + self fragment: (self decodePercent: (string copyFrom: index + 1 to: end)). + end := index - 1 ]. ((index := (string indexOf: $?)) between: 1 and: end) ifTrue: [ self query: (self parseQueryFrom: (ReadStream on: string from: index + 1 to: end)).