Skip to content

-Infinity values are not handled correctly in JSON #703

@rajsite

Description

@rajsite

A user found that when using UnflattenFromJSON for double arrays, if the JSON string encounters -Infinity then:

  1. The node errors with code -375011
  2. The node returns an array with partially parsed results

See forum: https://forums.ni.com/t5/G-Web-Development-Software/Bug-on-Unflatten-from-JSON/m-p/4361814#M702

image

Didn't thoroughly debug but scanning source the following line looks suspicious which seems to indicate that any negative value will not be treated like Infinity:

(leadingChar == '.' || leadingChar == '-' || isdigit(leadingChar)); // not inf, nan

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions