Skip to content

Commit

Permalink
Changed calc_index_va to one-based indexing.
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@709 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
ankar committed Feb 5, 2002
1 parent bb21cbc commit 537cee5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions c_runtime/real_array.c
Expand Up @@ -225,13 +225,13 @@ real* calc_index_va(real_array_t* source,int ndims,va_list ap)
{
int i;
int index;
int dim_s;
int dim_i;

index = 0;
for (i = 0; i < ndims; ++i)
{
dim_s = va_arg(ap,int);
index = index*source->dim_size[i]+dim_s;
dim_i = va_arg(ap,int)-1;
index = index*source->dim_size[i]+dim_i;
}

return source->data+index;
Expand Down

0 comments on commit 537cee5

Please sign in to comment.