Merge pull request #1954 from corporateshark/master

Fix warning: size_t->int implicit cast