Mojira Archive
MC-260602

'data modify from string' index failure does not return 0 for 'execute store success'

Issue/Expected result:{}

If you attempt to data modify from a string, but your end exceeds the length of the string, the command returns "unexpected error".

The expected result in my opinion is that since the command failed, we get a success of 0, however, as you will see, success erroneously returns 1

Steps to reproduce:

 

#simple setup for the following code to work
/summon marker ~ ~ ~ {Tags:["example"]}
/scoreboard objectives add test dummy
/scoreboard objectives setdisplay sidebar test
#Correctly success=1, marker->data.message has 'over'
/execute store success score @p test run data modify entity @e[type=marker,tag=example,limit=1] data.result set string entity @p SpawnDimension 10 14
#Marker data does not update, however, success is still true
/execute store success score @p test run data modify entity @e[type=marker,tag=example,limit=1] data.result set string entity @p SpawnDimension 10 100

Fixed

paulo khayat

[Mojang] slicedlime

2023-02-27, 02:56 AM

2023-05-12, 12:57 PM

2023-05-12, 12:57 PM

6

5

Community Consensus

Normal

Platform

Commands, Save Data

1.19.4 Pre-release 1, 23w14a

1.20 Pre-release 2