Index: SingleSource/Benchmarks/Stanford/Bubblesort.c =================================================================== --- SingleSource/Benchmarks/Stanford/Bubblesort.c +++ SingleSource/Benchmarks/Stanford/Bubblesort.c @@ -148,11 +148,15 @@ i=1; while ( i sortlist[i+1] ) { - j = sortlist[i]; - sortlist[i] = sortlist[i+1]; - sortlist[i+1] = j; + int sli = sortlist[i]; + int sli1 = sortlist[i + 1]; + if ( sli > sli1 ) { + j = sli; + sli = sli1; + sli1 = j; } + sortlist[i] = sli; + sortlist[i + 1] = sli1; i=i+1; }