Prechádzať zdrojové kódy

[str.h] Fixing str_slice size calculation

Vinicius Teshima 1 rok pred
rodič
commit
1e4e132dc3
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      src/str.h

+ 1 - 1
src/str.h

@@ -142,7 +142,7 @@ str_slice(struct str str, size_t from, size_t to)
 	     + ( to <= str.size ) * to;
 	
 	str.data += from;
-	str.size = from - to;
+	str.size = to - from;
 
 	return str;