summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/hackvr.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/hackvr.c b/src/hackvr.c
index 7ae6616..12a35b3 100644
--- a/src/hackvr.c
+++ b/src/hackvr.c
@@ -90,6 +90,7 @@ int load_stdin() {//this function returns -1 to quit, 0 to not ask for a redraw,
int len;
int ret=0;
int j,k,l;
+ int counter;
//struct timeval timeout;
//fd_set master;
//fd_set readfs;
@@ -115,7 +116,11 @@ int load_stdin() {//this function returns -1 to quit, 0 to not ask for a redraw,
}
if(FD_ISSET(0,&readfs)) {*/
//#endif
- while((line=line?free(line),read_line_hack(stdin,0):read_line_hack(stdin,0))) {//load as long there's something to load
+ counter=0;
+ for(counter=0;counter < 100 && (line=line?free(line),read_line_hack(stdin,0):read_line_hack(stdin,0));counter++) {//load as long there's something to load
+ //but doing this will make it not ever redraw the screen as long as there's more to read.
+ //how do we compensate for this? an alarm that will break us out?
+ //a counter that will break us out?
if(*line == '#') continue;
// fprintf(stderr,"# read command: %s\n",line);
if(a) free(a);//use a static char pointer array so I don't have to use the heap. possible optimization.