secondlife / jira-archive

2 stars 0 forks source link

[BUG-5715] llJsonSetValue fails to encode a "-" (and certain other characters) as a string #13644

Open sl-service-account opened 10 years ago

sl-service-account commented 10 years ago

Steps to Reproduce

Actual Behavior

llSay(0, llJsonSetValue("", [], "-")); returns:

Expected Behavior

It should return: "-"

Other information

Original Jira Fields | Field | Value | | ------------- | ------------- | | Issue | BUG-5715 | | Summary | llJsonSetValue fails to encode a "-" (and certain other characters) as a string | | Type | Bug | | Priority | Unset | | Status | Accepted | | Resolution | Accepted | | Reporter | slmember1 (slmember1) | | Created at | 2014-04-12T09:19:35Z | | Updated at | 2014-04-14T17:52:42Z | ``` { 'Business Unit': ['Platform'], 'Date of First Response': '2014-04-14T12:16:02.804-0500', 'System': 'SL Simulator', 'Target Viewer Version': 'viewer-development', 'What just happened?': 'llSay(0, llJsonSetValue("", [], "-"));\r\nreturns:\r\n-', 'What were you doing when it happened?': '-', 'What were you expecting to happen instead?': 'It should return:\r\n"-"', } ```
sl-service-account commented 10 years ago

Maestro Linden commented at 2014-04-14T17:16:03Z, updated at 2014-04-14T17:16:17Z

Thanks for the report. I can reproduce this under Second Life Server 14.03.12.288004; it seems that the function is incorrectly parsing '-' as a number. It should only parse this character as part of a number if there are trailing numerals (and nothing else in the string).

sl-service-account commented 10 years ago

Maestro Linden commented at 2014-04-14T17:52:18Z

These strings (which are valid as part of numbers in certain contexts, but not without numerals) are also affected:

e E .