Skip to content

Commit 0c5de1f

Browse files
mafintoshbnoordhuis
authored andcommitted
doc: fix double smalloc example
PR-URL: #413 Reviewed-By: Ben Noordhuis <[email protected]>
1 parent 0926cb9 commit 0c5de1f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/api/smalloc.markdown

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ possible options are listed in `smalloc.Types`. Example usage:
4444
var doubleArr = smalloc.alloc(3, smalloc.Types.Double);
4545

4646
for (var i = 0; i < 3; i++)
47-
doubleArr = i / 10;
47+
doubleArr[i] = i / 10;
4848

4949
// { '0': 0, '1': 0.1, '2': 0.2 }
5050

0 commit comments

Comments
 (0)