Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

unable to run or print the program #3824

Closed
3 tasks done
selinar1 opened this issue Oct 6, 2023 · 1 comment
Closed
3 tasks done

unable to run or print the program #3824

selinar1 opened this issue Oct 6, 2023 · 1 comment

Comments

@selinar1
Copy link

selinar1 commented Oct 6, 2023

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

上 200 个密钥:
 w s \ " Space ; Space i f Space ( $ ? ) Space { Space c l a n g Space Space - g Space # 3 . c Space - o Space # 3 Space } Space ; Space i f Space ( $ ? ) Space { Space . \ # 3 Space } Enter
 h t t p s : / / g i t h u b . c o m / l z y b k r / P S R e a d L i n e / i s s u e s / n e w h t t p s : / / g i t h u b . c o m / l z y b k r / P S R e a d L i n e / i s s u e s / n e w h t t p s : / / g i t h u b . c o m / l z y b k r / P S R e a d L i n e / i s s u e s / n e w

异常:
System.ArgumentOutOfRangeException: 该值必须大于或等于零
,且必须小于控制台缓冲区在该维度的大小。
参数名: top
实际值是 -6。
   在 System.Console.SetCursorPosition(Int32 left, Int32 top)
   在 Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)
   在 Microsoft.PowerShell.PSConsoleReadLine.ForceRender()
   在 Microsoft.PowerShell.PSConsoleReadLine.Insert(Char c)
   在 Microsoft.PowerShell.PSConsoleReadLine.SelfInsert(Nullable`1 key, Object arg)
   在 Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(ConsoleKeyInfo key, Dictionary`2 dispatchTable, Boolean ignoreIfNoAction, Object arg)
   在 Microsoft.PowerShell.PSConsoleReadLine.InputLoop()   在 Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)     
-----------------------------------------------------------------------

Screenshot

35e626b7a886b9ccea5ce572d5b2eb6
c4f7d5bdc2fa563a9a0f8d2f6d904da

Environment data

no

Steps to reproduce

#include <stdio.h>
int main ()
{
int a,b;
printf("please enter two numbers:\n");
scanf("%d %d",&a,&b);
if(a>b)
printf("%d\n",a);
else
printf("%d\n",b);
return 0;
}

Expected behavior

run the program

Actual behavior

unable to run

@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 Oct 6, 2023
@github-actions
Copy link

github-actions bot commented Oct 6, 2023

This issue was already fixed (see #1306). Please upgrade to the 2.3.4 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.

@github-actions github-actions bot closed this as completed Oct 6, 2023
@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 Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant