Skip to content

Commit 6b89e1f

Browse files
authored
fix loop condition for incx < 0
1 parent 20016a0 commit 6b89e1f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

kernel/riscv64/znrm2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ FLOAT CNAME(BLASLONG n, FLOAT *x, BLASLONG inc_x)
6262
inc_x2 = 2 * inc_x;
6363

6464
n *= inc_x2;
65-
while(i < n)
65+
while(abs(i) < abs(n))
6666
{
6767

6868
if ( x[i] != 0.0 )

0 commit comments

Comments
 (0)