php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40225 ncurses_instr() is broken
Submitted: 2007-01-24 20:16 UTC Modified: 2007-01-24 20:45 UTC
From: bnewton at networkmerchants dot com Assigned:
Status: Not a bug Package: ncurses related
PHP Version: 5.2.0 OS: gentoo Linux 2006
Private report: No CVE-ID: None
 [2007-01-24 20:16 UTC] bnewton at networkmerchants dot com
Description:
------------
ncurses_instr appears to be broken. It returns a random number of lowercase q's without waiting for actual user input. 

Reproduce code:
---------------
$name = 0;
ncurses_init();
ncurses_addstr("Enter Your Name");
ncurses_move(1,0); 
ncurses_instr($name);
ncurses_move(2,0); 
ncurses_addstr(" Hello $name");
ncurses_getch();
ncurses_end();

Expected result:
----------------
Enter Your Name
Bill
Hello Bill

Actual result:
--------------
Enter Your Name
Bill
Hello qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq



number of q's vary from execution to execution typically over one hundred

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-01-24 20:45 UTC] tony2001@php.net
ncurses_instr() does completely different thing.
What you need is ncurses_getch().
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Fri Aug 07 00:01:25 2020 UTC