-
Notifications
You must be signed in to change notification settings - Fork 182
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
init_color makes BadAccess (opcode 88) in X11 #47
Comments
I'm unable to reproduce this error, although I think I can fix it easily enough. I'd be interested to know more about your test system (OS, etc.). (I tried macOS 10.14.1 and Ubuntu 18.10.) Edit: Oops, I see you did mention Debian 9. BTW, init_color() doesn't necessarily let you redefine all colors -- though of course, it should return ERR rather than crashing. ;) In the Windows console, only the first 16 colors can be redefined. (I could do all 256, but it's more complicated... maybe later.) In this case, though, yes, all 256 colors should be redefinable. |
that it hadn't allocated. Since these are read-only cells, and automatically freed on exit, it should be OK to omit this. Reported by rin-kinokocan.
OK, I committed a patch. Please let me know if this resolves your problem. |
Yep! It fixed the crash! Thank you so much! |
…ee" colors that it hadn't allocated. Since these are read-only cells, and automatically freed on exit, it should be OK to omit this. Reported by rin-kinokocan.
When the first argument of init_color is more than 17, it will raise an error.
In X11 environment (I'm using debian9), I compiled above code with gcc like this:
gcc test.c -lXCurses -lX11 -lSM -lXaw -lXmu -lXt -lXpm -lICE
It successfully compiled.However, when I ran the executable, it fails with this error message:
COLORS is set to 256, therefore init_color should be able to change more than 16 color definitions.
init_color test is only done in a range of 0 to 16 in a demo file (testcurs.c), so the demo works fine.
The text was updated successfully, but these errors were encountered: