lobophf / aimt

array index mapping tool for C language

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The integer overflow can occur in some cases

lobophf opened this issue · comments

The sub2ind function can work with arrays of various dimensions that can certainly return an index value above the limit that an integer can support. Therefore, to prevent the integer overflow, it is necessary to change the sub2ind function so that it returns a long long int.

I would like to work on this one today.
#28

@CarltonBranch, I'm so glad that you are considering contributing to this project. I'm planning to write the contribution guide yet. But for now, it would be nice if you used the commit template that I'm using in this repository.

You can easily configure it using the command below:
$ git config --local commit.template docs/.git-commit-template.txt

Also, consider that the functions ind2sub and sub2ind must work in C language.