Navigation

    Fuze Arena Logo
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Help
    • Discord

    Hard crash when slicing an array down to length zero

    Bug Reporting (FUZE 4 Nintendo Switch)
    2
    2
    241
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Z-Mann
      Z-Mann last edited by

      Another hard crash:

      b = [0]
      c = b[1:-1] // should yield empty array c = [], print(c) would confirm that
      c[len(c)] = 0
      print("c = ", c, "\n")
      

      The crash happens at the print statement, but originally, I observed a hard crash after a [1:-1] slice on a single element array with non-print operations that I could not cook down to a presentable state. Something about the state of c must be wrong right from the start, appending 0 makes it worse, print falls into the trap.
      Making b at the start larger avoids the crash, it only hits if the resulting slice length is 0.

      Workaround: Just init c to an empty array.

      1 Reply Last reply Reply Quote 1
      • Dave
        Dave Fuze Team last edited by

        Thank you for the report @Z-Mann! We'll be looking into this.

        1 Reply Last reply Reply Quote 2
        • First post
          Last post