Re: [fpc-pascal] Pchar from constant string

2023-06-30 Thread Tomas Hajny via fpc-pascal
On 2023-06-30 11:11, Michael Van Canneyt via fpc-pascal wrote: On Fri, 30 Jun 2023, Hairy Pixels via fpc-pascal wrote: On Jun 30, 2023, at 9:03 AM, Hairy Pixels wrote: That's why that worked. Hmm with short strings the null terminator could be truncated when copying right? Something to l

Re: [fpc-pascal] Pchar from constant string

2023-06-30 Thread Michael Van Canneyt via fpc-pascal
On Fri, 30 Jun 2023, Michael Van Canneyt via fpc-pascal wrote: On Fri, 30 Jun 2023, Hairy Pixels via fpc-pascal wrote: On Jun 30, 2023, at 9:03 AM, Hairy Pixels wrote: That's why that worked. Hmm with short strings the null terminator could be truncated when copying right? Something

Re: [fpc-pascal] Pchar from constant string

2023-06-30 Thread Michael Van Canneyt via fpc-pascal
On Fri, 30 Jun 2023, Hairy Pixels via fpc-pascal wrote: On Jun 30, 2023, at 9:03 AM, Hairy Pixels wrote: That's why that worked. Hmm with short strings the null terminator could be truncated when copying right? Something to look out for. this is what I meant about truncation. S is no

Re: [fpc-pascal] Pchar from constant string

2023-06-30 Thread Hairy Pixels via fpc-pascal
> On Jun 30, 2023, at 9:03 AM, Hairy Pixels wrote: > > That's why that worked. Hmm with short strings the null terminator could be > truncated when copying right? Something to look out for. this is what I meant about truncation. S is no longer null terminated and now the pchar will fail whe