main.ml: gotoremote: fix parsing of "page=%d"

This commit is contained in:
hazen2215 2024-01-02 23:08:14 +09:00
parent 01d220f93e
commit 93f8f128ab
1 changed files with 3 additions and 3 deletions

View File

@ -2792,11 +2792,11 @@ let gotoremote spec =
S.ranchors := ranchor :: !S.ranchors;
opendoc path E.s E.s;
in
if substratis spec 0 "page="
if substratis dest 0 "page="
then
match Scanf.sscanf spec "page=%d" (fun n -> n) with
match Scanf.sscanf dest "page=%d" (fun n -> n) with
| exception exn ->
adderrfmt "error parsing remote destination" "%s %s" spec @@ exntos exn
adderrfmt "error parsing remote destination" "%s %s" dest @@ exntos exn
| pageno ->
S.anchor := (pageno, 0.0, 0.0);
dospawn @@ lazy (Printf.sprintf "%s -page %d %S"