Skip to content

Weerd issue , i was returning to my old code and it gave a insane error #4714

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
3 tasks done
Maxwelion opened this issue Apr 20, 2025 · 1 comment
Closed
3 tasks done

Comments

@Maxwelion
Copy link

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

Last 105 Keys:
 c d Space " c : \ U s e r s \ P C \ D e s k t o p \ C + + Space s t u f f \ C + + 2 . c o d e \ " Space ; Space i f Space ( $ ? ) Space { Space g + + Space h e l l o . c p p Space - o Space h e l l o Space } Space ; Space i f Space ( $ ? ) Space { Space . \ h e l l o 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)

Screenshot

Image

Environment data

windows 10

Steps to reproduce

Same as title .
Code :

#include
#include
using namespace std;
//Rimski broj I/V je zadatak a 2. je test

/* I 2.
int main(){
int b;
cout<<"Unesi broj \n";
cin>>b;

for (int i = 1; i <= abs(b) / 2; i++) { 

    if (b % i == 0) {
        std::cout << i << " ";
    }
}


return 0;

}
*/

/* II 2.
int main(){
int a,b,c;
cout<<"Unesi njihove prste [0-4] : \n";
cin>>a>>b>>c;
int b_=b5;
int c_=c
25;

int s=a+b_+c_;
cout<<s<<"\n";
return 0;

}
*/

int main(){
int a,b;
cout<<"Unesi 2 trocifrena broja \n";
cin>>a>>b;

int z=b-a;
int c=0;
for(int i=0;i<z;i++){
    if((a+i)%2==0){
        c++;

    }    
}

cout<<c;    








return 0;

}

Expected behavior

i was expecting a small issue usualy when i return to continue working on the projects

Actual behavior

i ran it to see the curent errors needed to be fixed i left for my self and it gave that error and this came out in the terminal (what i posted a bit erlyer)

Im not looking for help it was trash code , just wanted to at lest poast about it , if you can fix it fire , if its mising critical info well ask and ill give (im not feeling like instaling power shell).

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. label Apr 20, 2025
Copy link

This issue was already fixed (see #1306). Please upgrade to the 2.3.5 version of PSReadLine from PowerShell Gallery.
See the upgrading section for instructions. Please let us know if you run into the same issue with the latest version.

@microsoft-github-policy-service microsoft-github-policy-service bot removed the Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. label Apr 21, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@Maxwelion and others