diff options
author | Martin Ettl <ettl.martin78@gmail.com> | 2015-01-21 15:18:39 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-01-21 15:19:39 +0300 |
commit | f23338e107503ea9cddaa1e0155556f750c8c15a (patch) | |
tree | ac119658ea9460b77c99d2750f6ad2b1fe90332b /intern/opennl | |
parent | a86482f81cf3e4a0043459b10242d4a9c337105b (diff) |
Fix limit check before accessing array in opennl
Please note that opennl is already modified (for double precision)
so re-integration is not really easy. Also, we'll eventually switch
to Eigen.
For until that let's just solve the condition in our bundled opennl.
Diffstat (limited to 'intern/opennl')
-rw-r--r-- | intern/opennl/superlu/heap_relax_snode.c | 2 | ||||
-rw-r--r-- | intern/opennl/superlu/relax_snode.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/intern/opennl/superlu/heap_relax_snode.c b/intern/opennl/superlu/heap_relax_snode.c index d4b3e229224..cd88179bbb7 100644 --- a/intern/opennl/superlu/heap_relax_snode.c +++ b/intern/opennl/superlu/heap_relax_snode.c @@ -99,7 +99,7 @@ heap_relax_snode ( } j++; /* Search for a new leaf */ - while ( descendants[j] != 0 && j < n ) j++; + while ( j < n && descendants[j] != 0 ) j++; } #if ( PRNTlevel>=1 ) diff --git a/intern/opennl/superlu/relax_snode.c b/intern/opennl/superlu/relax_snode.c index 49f600533a8..4a9265e0fde 100644 --- a/intern/opennl/superlu/relax_snode.c +++ b/intern/opennl/superlu/relax_snode.c @@ -66,7 +66,7 @@ relax_snode ( relax_end[snode_start] = j; /* Last column is recorded */ j++; /* Search for a new leaf */ - while ( descendants[j] != 0 && j < n ) j++; + while ( j < n && descendants[j] != 0 ) j++; } /*printf("No of relaxed snodes: %d; relaxed columns: %d\n", |