Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
703602-Compiler-Construction
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
User expired
703602-Compiler-Construction
Commits
34237b0f
Commit
34237b0f
authored
5 years ago
by
User expired
Browse files
Options
Downloads
Patches
Plain Diff
fixed wrong array size
parent
0d1e01ab
Branches
patch-1
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/dijkstra/dijkstra.mc
+4
-5
4 additions, 5 deletions
examples/dijkstra/dijkstra.mc
with
4 additions
and
5 deletions
examples/dijkstra/dijkstra.mc
+
4
−
5
View file @
34237b0f
void dijkstra(int[15] path_cost)
void dijkstra(int[16] path_cost)
{
int[1
5
] calc_cost;
int[1
6
] calc_cost;
int i;
int j;
i = 0;
...
...
@@ -96,7 +95,7 @@ void dijkstra(int[15] path_cost)
int
main
()
{
int
[1
5
]
path_cost
;
int
[1
6
]
path_cost
;
int
input_counter
;
int
node_counter
;
input_counter =
1;
...
...
@@ -106,7 +105,7 @@ int main()
print
("
Enter
the
path
costs
('0'
=
no
path
)");
print_nl
();
while
(
input_counter
<
1
5
)
while
(
input_counter
<
1
6
)
{
if
(
input_counter
<
4)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment