Skip to content

Crash on Clicking on user #4210

@sakaldevverm

Description

@sakaldevverm

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest released version
  • Search the existing issues, especially the pinned issues.

Exception report

PS C:\Users\HP\Desktop\Coding\C++ Coding>
c
Oops, something went wrong.  Please report this bug with the details below.       
Report on GitHub: https://github.com/lzybkr/PSReadLine/issues/new
-----------------------------------------------------------------------
Last 163 Keys:
 c d Space " c : \ U s e r s \ H P \ D e 
s k t o p \ C o d i n g \ C + + Space C o d i n g \ C h a p t e r Space 6 Space R 
e r c u r s i o n \ " Space ; Space i f Space ( $ ? ) Space { Space g + + Space i 
s N u m b e r O a l i h n r o m e . c p p Space - o Space i s N u m b e r O a l i 
h n r o m e Space } Space ; Space i f Space ( $ ? ) Space { Space . \ i s N u m b 
e r O a l i h n r o m e Space } Enter    


Exception:
System.ArgumentOutOfRangeException: The value must be greater than or equal to zero and less than the console's buffer size in that dimension.
Parameter name: left
Actual value was -2.
   at System.Console.SetCursorPosition(Int32 left, Int32 top)
   at Microsoft.PowerShell.Internal.VirtualTerminal.set_CursorLeft(Int32 value)   
   at Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)
   at Microsoft.PowerShell.PSConsoleReadLine.ForceRender()
   at Microsoft.PowerShell.PSConsoleReadLine.Insert(Char c)
   at Microsoft.PowerShell.PSConsoleReadLine.SelfInsert(Nullable`1 key, Object arg)
   at Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(ConsoleKeyInfo key, Dictionary`2 dispatchTable, Boolean ignoreIfNoAction, Object arg)
   at Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
   at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)
-----------------------------------------------------------------------
PS C:\Users\HP\Desktop\Coding\C++ Coding>
Oops, something went wrong.  Please report this bug with the details below.       
Report on GitHub: https://github.com/lzybkr/PSReadLine/issues/new
-----------------------------------------------------------------------
Last 163 Keys:
 c d Space " c : \ U s e r s \ H P \ D e 
s k t o p \ C o d i n g \ C + + Space C o d i n g \ C h a p t e r Space 6 Space R 
e r c u r s i o n \ " Space ; Space i f Space ( $ ? ) Space { Space g + + Space i 
s N u m b e r O a l i h n r o m e . c p p Space - o Space i s N u m b e r O a l i 
h n r o m e Space } Space ; Space i f Space ( $ ? ) Space { Space . \ i s N u m b 
e r O a l i h n r o m e Space } Enter    


Exception:
System.ArgumentOutOfRangeException: The value must be greater than or equal to zero and less than the console's buffer size in that dimension.
Parameter name: left
Actual value was -1.
   at System.Console.SetCursorPosition(Int32 left, Int32 top)
   at Microsoft.PowerShell.Internal.VirtualTerminal.set_CursorLeft(Int32 value)   
   at Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)
   at Microsoft.PowerShell.PSConsoleReadLine.ForceRender()
   at Microsoft.PowerShell.PSConsoleReadLine.Insert(Char c)
   at Microsoft.PowerShell.PSConsoleReadLine.SelfInsert(Nullable`1 key, Object arg)
   at Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(ConsoleKeyInfo key, Dictionary`2 dispatchTable, Boolean ignoreIfNoAction, Object arg)
   at Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
   at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)
-----------------------------------------------------------------------
PS C:\Users\HP\Desktop\Coding\C++ Coding>

Screenshot

Screenshot (161)

Environment data

#include<iostream>
using namespace std;

bool f(int num, int *temp) {
    // base case
    if(num >= 0 && num <= 9) {
        int last_digit_of_temp = (*temp)%10;
        (*temp) /= 10;
        return (num == last_digit_of_temp);
    }
    bool result = (f(num/10, temp) and (num%10) == ((*temp) % 10));
    (*temp) /= 10;
    return result;
}

int main() {
    // int num = 1441;
    int num;
    cout<<"Enter  number: ";
    cin>>num;
    int another_num = num;
    int *temp =  &another_num;
    cout<<f(num, temp);

    return 0;
}

Steps to reproduce

Uploading Screenshot (161).png…

Expected behavior

Uploading Screenshot (161).png…

Actual behavior

Uploading Screenshot (161).png…

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