Skip to content

Problem with very long int64 constant #338

Closed

Description

After I entered 1453632006106000000000L (which is an invalid long constant), I got the following error from PSReadLine:

> 1453632006106000000000L
Недопустимая числовая константа 1453632006106000000000L.
Oops, something went wrong.  Please report this bug with the details below.
Report on GitHub: https://github.com/lzybkr/PSReadLine/issues/new
Or email: [REDACTED]
-----------------------------------------------------------------------
Last 200 Keys:
 LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow LeftArrow Backspace 8 End # 8 . " Enter UpArrow UpArrow UpArrow UpArrow Ctrl+c Enter 0 ^ \ 0 - 0 0 0 0 0 \ 0 0 0 0 0 0 0 0 \ 0 0 0 - 0 0 0 0 0 0 0 Spacebar 0 0 0 0 0 0 0 0 0 0 Spacebar 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ^ ^ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ( 1 Ctrl+c 1 4 5 3 6 3 2 0 0 6 1 0 6 0 Enter UpArrow LeftArrow 0 0 0 Enter UpArrow LeftArrow - - Backspace Backspace 0 0 0 Enter UpArrow LeftArrow LeftArrow RightArrow 0 0 0 Enter Ctrl+c v a c u u m Enter Spacebar 1 4 5 3 6 3 2 0 0 6 1 0 6 0 0 0 0 0 0 0 0 0 L Backspace L Home Delete End Enter

Exception:
System.IndexOutOfRangeException: Индекс находился вне границ массива.
   в System.Text.StringBuilder.get_Chars(Int32 index)
   в PSConsoleUtilities.PSConsoleReadLine.ConvertOffsetToCoordinates(Int32 offset)
   в PSConsoleUtilities.PSConsoleReadLine.ReallyRender()
   в PSConsoleUtilities.PSConsoleReadLine.AcceptLineImpl(Boolean validate)
   в PSConsoleUtilities.PSConsoleReadLine.ProcessOneKey(ConsoleKeyInfo key, Dictionary`2 dispatchTable, Boolean ignoreIfNoAction, Object arg)
   в PSConsoleUtilities.PSConsoleReadLine.InputLoop()
   в PSConsoleUtilities.PSConsoleReadLine.ReadLine(Runspace remoteRunspace, EngineIntrinsics engineIntrinsics)
-----------------------------------------------------------------------

Activity

  1. lzybkr commented on Jan 25, 2016

    @lzybkr
    Contributor

    I can't repro on Win10 (PowerShell V5). It's possibly related to a bug that I fixed, I think the bug is present in PowerShell V3/V4, fixed in V5, but I think I also put in a workaround in PSReadline.

    At any rate, can you try the latest: https://github.com/lzybkr/PSReadLine/releases/tag/v1.2

  2. ForNeVeR commented on Jan 26, 2016

    @ForNeVeR
    ContributorAuthor

    It turned out that I was using older version 1.0.0.13. Updated to 1.2, and the bug is no more reproducible. Thank you, and also thank you again for such a great work on PSReadline! ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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