(02-01-2021, 10:17 PM)ZGabrovski@gmail.com Wrote: OK, but why this code has no problem with android 8/9, only fails with Android 10?
I can't answer that, as I'm not a FPC developer, or an Android 9/10 user (my phone has Android 8). You are going to have to debug the issue for yourself. In the meantime, I'm considering your proposed change, though I'm going to make some tweaks to it before merging it into Indy's main code.
02-02-2021, 01:22 AM (This post was last modified: 02-02-2021, 01:55 AM by rlebeau.)
(02-01-2021, 11:45 PM)rlebeau Wrote: In the meantime, I'm considering your proposed change, though I'm going to make some tweaks to it before merging it into Indy's main code.
Attached are the tweaks I have made so far. Let me know if they work.
02-05-2021, 06:36 AM (This post was last modified: 02-05-2021, 07:01 AM by ZGabrovski@gmail.com.)
(02-02-2021, 01:22 AM)rlebeau Wrote:
(02-01-2021, 11:45 PM)rlebeau Wrote: In the meantime, I'm considering your proposed change, though I'm going to make some tweaks to it before merging it into Indy's main code.
Attached are the tweaks I have made so far. Let me know if they work.
Sorry for the late reply.
It is not working well.
I will investigate where the problems come from, but this will take some time.
Regards,
Zdravko
Please, find attached file with bugs fixed. Now it works.
Not testing under Android, later on I will test. Test under Ubuntu linux.
I am no expecting the problems under android, if then function "SetSrting" terminates the string with #0 and string length will be OK.
But I will test tonight just in case.
(02-05-2021, 06:36 AM)ZGabrovski@gmail.com Wrote: Please, find attached file with bugs fixed. Now it works.
I have made further tweaks. See attached, as well as checked in to a GitHub branch. I suggest you work from that branch from now on, you are getting out of sync with Indy's main code.
(02-05-2021, 06:36 AM)ZGabrovski@gmail.com Wrote: I am no expecting the problems under android, if then function "SetSrting" terminates the string with #0 and string length will be OK.
But I will test tonight just in case.
Yes, SetString() guarantees the output string is null-terminated properly.