Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kumir2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
kumir
kumir2
Commits
65f1a900
Commit
65f1a900
authored
Jan 24, 2013
by
Victor Yacovlev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed runtime error on partial array initialization
parent
d3f8bed7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
src/shared/vm/variant.hpp
src/shared/vm/variant.hpp
+1
-0
src/shared/vm/vm.hpp
src/shared/vm/vm.hpp
+5
-1
No files found.
src/shared/vm/variant.hpp
View file @
65f1a900
...
@@ -565,6 +565,7 @@ void Variable::setConstValue(const Variable & ctab)
...
@@ -565,6 +565,7 @@ void Variable::setConstValue(const Variable & ctab)
for
(
int
y
=
0
;
y
<=
sy
;
y
++
)
{
for
(
int
y
=
0
;
y
<=
sy
;
y
++
)
{
for
(
int
x
=
0
;
x
<=
sx
;
x
++
)
{
for
(
int
x
=
0
;
x
<=
sx
;
x
++
)
{
setValue
(
my
+
y
,
mx
+
x
,
ctab
.
value
(
cy
+
y
,
cx
+
x
));
setValue
(
my
+
y
,
mx
+
x
,
ctab
.
value
(
cy
+
y
,
cx
+
x
));
unsetError
();
}
}
}
}
break
;
break
;
...
...
src/shared/vm/vm.hpp
View file @
65f1a900
...
@@ -2116,7 +2116,11 @@ void KumirVM::do_load(uint8_t s, uint16_t id)
...
@@ -2116,7 +2116,11 @@ void KumirVM::do_load(uint8_t s, uint16_t id)
val
.
setDimension
(
moduleContexts
[
stack_contexts
.
top
().
moduleContextNo
].
constants
[
id
].
dimension
());
val
.
setDimension
(
moduleContexts
[
stack_contexts
.
top
().
moduleContextNo
].
constants
[
id
].
dimension
());
moduleContexts
[
stack_contexts
.
top
().
moduleContextNo
].
constants
[
id
].
getBounds
(
bounds
);
moduleContexts
[
stack_contexts
.
top
().
moduleContextNo
].
constants
[
id
].
getBounds
(
bounds
);
val
.
setBounds
(
bounds
);
val
.
setBounds
(
bounds
);
val
.
setValue
(
moduleContexts
[
stack_contexts
.
top
().
moduleContextNo
].
constants
[
id
].
value
());
bool
wasError
=
Kumir
::
Core
::
getError
().
length
()
>
0
;
AnyValue
v
=
moduleContexts
[
stack_contexts
.
top
().
moduleContextNo
].
constants
[
id
].
value
();
if
(
!
wasError
)
Variable
::
unsetError
();
val
.
setValue
(
v
);
val
.
setConstantFlag
(
true
);
val
.
setConstantFlag
(
true
);
}
}
else
{
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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