summaryrefslogtreecommitdiffhomepage
path: root/include/stc/cspan.h
diff options
context:
space:
mode:
authortylov <[email protected]>2023-07-10 10:53:30 +0200
committertylov <[email protected]>2023-07-10 10:53:30 +0200
commit6fe1ec0e0e3dbce71797873f71a5f306b046319f (patch)
tree329869548de3cc19c4137f4632761af3fa8756da /include/stc/cspan.h
parentbe5864d5f658d544ad5c2af9f1c5b37b4d96bde8 (diff)
downloadSTC-modified-6fe1ec0e0e3dbce71797873f71a5f306b046319f.tar.gz
STC-modified-6fe1ec0e0e3dbce71797873f71a5f306b046319f.zip
- Fixed meta-programming bug in carc and cbox hash function def (regression).
- Reverted to allow static linking of cstr and csview. Still defaults to shared linking + inlines.
Diffstat (limited to 'include/stc/cspan.h')
-rw-r--r--include/stc/cspan.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/stc/cspan.h b/include/stc/cspan.h
index 715efea8..7a0e9c8d 100644
--- a/include/stc/cspan.h
+++ b/include/stc/cspan.h
@@ -189,7 +189,7 @@ typedef struct { int32_t d[6]; } cspan_tuple6;
STC_INLINE intptr_t _cspan_size(const int32_t shape[], int rank) {
intptr_t sz = shape[0];
- while (rank-- > 1) sz *= shape[rank];
+ while (--rank > 0) sz *= shape[rank];
return sz;
}