It looks like the problem is that you are declaring and int:
int bufferSize;
and then passing a pointer to it where a size_t* is expected:
mbstowcs_s((size_t*)&bufferSize, ...);
This pattern is repeated for the variable pos later in the same function.
Changing both of these to size_t seems to eliminate the crash for me, but leaves me wondering whether I should be trying to use Spire in a 64-bit project...
It looks like the problem is that you are declaring and
int
:and then passing a pointer to it where a
size_t*
is expected:This pattern is repeated for the variable
pos
later in the same function.Changing both of these to
size_t
seems to eliminate the crash for me, but leaves me wondering whether I should be trying to use Spire in a 64-bit project...