Skip to content
⌘ NSIS Forum Archive

Passing space for a variable to use

7 posts

zbd#

Passing space for a variable to use

Hi, I am wondering how I make sure my variable has enough space to store a 12 character code in. It appears that without giving it more space, it cuts off the last character of the code.

I am using the PPC-Registry plugin to read the value from the PDA's registry.

Thanks if anyone can help.
zbd#
I think I have found where the problem is occurring.
It appears that the code is not being written properly by my application to the registry in the first place.
If I create the activation code manually it will work fine.

Perhaps the string isn't being null-terminated.

Thanks for all the help.
Afrow UK#
Yes possibly the plugin isn't taking into account that the string length needs to be 1 greater to add the null-terminator which is overwriting an existing character.

Stu
zbd#
Is there possibly a way I can tell the plugin how many characters to read?

Otherwise, I'm looking at the way we write to the registry with my application. So, I think this may be the only way to fix it if the plugin won't take another paramater.

Cheers
Afrow UK#
You really should contact the author of the plugin. Contact Instructor who should be able to help you.

Stu
zbd#
Thanks,
I have found a workaround for the meantime.
Using the same PPC-Registry plugin, I am able to Copy the code to a temp location, then at end of installation, copy it back, and delete the temp version.

Thanks for everyone's help on this issue.
Zbd