projects
/
YACASL2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f656c0e
)
SVC 1の動作を、領域が満ちるまで文字が入力されるよう修正。
author
j8takagi
<j8takagi@nifty.com>
Sat, 13 Feb 2010 17:22:37 +0000
(
02:22
+0900)
committer
j8takagi
<j8takagi@nifty.com>
Sat, 13 Feb 2010 17:22:37 +0000
(
02:22
+0900)
src/exec.c
patch
|
blob
|
history
diff --git
a/src/exec.c
b/src/exec.c
index
353dc24
..
4851aea
100644
(file)
--- a/
src/exec.c
+++ b/
src/exec.c
@@
-11,11
+11,10
@@
void svcin()
char *buffer = malloc(INSIZE + 1);
if(fgets(buffer, INSIZE, stdin) == NULL) {
- memory[GR[1]] = 0x0;
- memory[GR[2]] = 0x0;
+ memory[GR[1]] = memory[GR[2]] = 0x0;
return;
}
- for(i = 0; i <
GR[1] && i <
INSIZE; i++) {
+ for(i = 0; i < INSIZE; i++) {
if(*(buffer + i) == '\0' || *(buffer + i) == '\n') {
--i;
break;