Changeset 412d157 in git


Ignore:
Timestamp:
Mar 17, 2014, 6:31:22 PM (10 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
Children:
789a7e93154cff0756258fc1aea3331cb78f20a8
Parents:
8312b1713453bd741017e4b14b959fda78ea460d
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2014-03-17 18:31:22+01:00
git-committer:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2014-03-17 18:31:55+01:00
Message:
fix: strip unknown chars from terminal input
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/feread.cc

    r8312b1 r412d157  
    208208  line = readline (pr);
    209209
     210  int i;
     211  for (i=strlen(line)-1;i>=0;i--) line[i]=line[i]&127;
     212
    210213  if (line==NULL)
    211214    return NULL;
     
    270273    return NULL;
    271274
     275  int i;
     276  for (i=strlen(line)-1;i>=0;i--) line[i]=line[i]&127;
     277
    272278  if (*line!='\0')
    273279  {
     
    301307  }
    302308  mflush();
    303   return fgets(s,size,stdin);
     309  char *line=fgets(s,size,stdin);
     310  int i;
     311  for (i=strlen(line)-1;i>=0;i--) line[i]=line[i]&127;
     312  return line;
    304313}
    305314
Note: See TracChangeset for help on using the changeset viewer.