Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tiger
nolimips
Commits
f73542e3
Commit
f73542e3
authored
Jul 06, 2003
by
Benoit Perrot
Browse files
Really fix read_string.
parent
96acd1ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/vm/virtual_machine.cc
View file @
f73542e3
...
...
@@ -500,14 +500,13 @@ namespace vm
case
8
:
{
int
i
=
0
;
for
(;
i
<
cpu
.
get_a
(
1
);
++
i
)
int
c
=
0
;
for
(;
(
i
<
cpu
.
get_a
(
1
)
-
1
)
&&
(
c
!=
'\n'
)
&&
(
c
!=
'\r'
)
;
++
i
)
{
int
c
=
std
::
cin
.
get
();
c
=
std
::
cin
.
get
();
if
(
std
::
cin
.
eof
())
break
;
_memory
.
store_byte
(
cpu
.
get_a
(
0
)
+
i
,
c
);
if
(
c
==
'\n'
||
c
==
'\r'
)
break
;
}
_memory
.
store_byte
(
cpu
.
get_a
(
0
)
+
i
,
0
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment