A statement like '*psize++;' might not do what you intended. Postfix 'operator++' is executed before 'operator*'.
Possible NULL pointer dereferencing fixed
Missing return statements added, otherwise NULL pointer dereferencing.
Deallocation errors fixed
Merge pull request #28 from BlueAndi/master

Some bugs fixed. Super Andi. Thanks!