RISC OS Open
Safeguarding the past, present and future of RISC OS for everyone
ROOL
Home | News | Downloads | Bugs | Bounties | Forum | Documents | Photos | Contact us
Account

Previous|Next

  • Tickets
  • » Ticket #549

Ticket #549 (Fixed)Fri May 13 12:26:28 UTC 2022

OS_SetVarVal not translating error block

Reported by: Richard Coleman (3190) Severity: Normal
Part: Release:
Milestone: Status Fixed

Details by Richard Coleman (3190):

As noted by nemo on his twitter feed, deleting a non-existent system variable
<pre><code>SYS “OS_SetVarVal”,“NotHere”,,-1</code></pre>

results in the error message:
<pre>System variable ‘%0’ not found</pre>

whereas reading a non-existent variable with:
<pre><code>SYS “OS_ReadVarVal”,“NotHere”,,-1</code></pre>
returns the error message:
<pre>System variable ‘NotHere’ not found</pre>

Fix is a change to Kernel.s.Arthur2 (Not tested but matches call to RVVNotFound)

Replace:
<pre><code>SetVarVal_DeleteIt
BL VarFindIt

; Error if not found ADREQL r0, ErrorBlock_VarCantFind ; V set no. 1) BEQ SetVarValBadExit_Translate

</code></pre>

with:
<pre><code>SetVarVal_DeleteIt
BL VarFindIt

; Error if not found BEQ SVVNotFound

</code></pre>

And just before label “SetVarValBadExit_Translate” add:
<pre><code>SVVNotFound
[ International
MOV r4, r0
ADRL r0, ErrorBlock_VarCantFind
BL TranslateError_UseR4
|
ADRL r0, ErrorBlock_VarCantFind
]
SETV
B SetVarVal_TestVExit
</code></pre>

Changelog:

Modified by Richard Coleman (3190) Fri, May 13 2022 - 12:27:09 GMT

  • Attachment added: Arthur2

Arthur2 with changes made attached

Modified by Richard Coleman (3190) Wed, June 01 2022 - 18:21:09 GMT

  • Status changed from Open to Fixed

Changes uploaded to GitLab and fix has now been merged into master branch, closing ticket.

  • Comment on, or change status of, this ticket

Previous|Next

Search tickets

Social

Follow us on and

ROOL Store

Buy RISC OS Open merchandise here, including SD cards for Raspberry Pi and more.

Donate! Why?

Help ROOL make things happen – please consider donating!

RISC OS IPR

RISC OS is an Open Source operating system owned by RISC OS Developments Ltd and licensed primarily under the Apache 2.0 license.

Options

  • Tickets
  • New ticket
  • Milestones
  • Subversion: Changesets
  • Subversion: Browse
  • CVS: Revisions
  • CVS: Browse
  • Search

RSS feeds Rss

  • Tickets
  • Everything!
  • More feeds...
Site design © RISC OS Open Limited 2018 except where indicated
The RISC OS Open Collaboa theme is distantly based on the Collaboa default layout

Valid XHTML 1.0  |  Valid CSS

Powered by Collaboa
This site runs on Rails

Hosted by Arachsys