9front - general discussion about 9front
 help / color / mirror / Atom feed
From: Grimmware <oholiab@grimmwa.re>
To: 9front@9front.org
Subject: Re: [9front] [PATCH] Correct acid's rune size to 4 bytes
Date: Fri, 01 Dec 2023 12:32:34 +0000	[thread overview]
Message-ID: <963d0ca4-518a-40a1-b95a-bc96ed9595a6@app.fastmail.com> (raw)
In-Reply-To: <37AED63CD461E005AD8BD7ABA842FBD3@felloff.net>

Yeah so it does, I've updated my test case to include a rune that triggers this bug (𐀀, U+10000, lower 2 bytes are empty) and have a fix for it, but before I do that I'm suddenly having second thoughts about the use of sizeof here for the rune string when I've just changed the \r (single rune) case to use `get4` anyway.

I think I want to switch this back to hardcoding 4 bytes instead of using sizeof on the basis that a) the rune size is probably not going to change again any time soon b) if it *does* acid would then be inconsistently wrong instead of consistently wrong c) consistency with the rest of the acid codebase.

Opinions?

On Wed, Nov 29, 2023, at 7:13 PM, cinap_lenrek@felloff.net wrote:
>> 			if(buf[i] == 0 && buf[i+1] == 0)
>> 				break;
>
> this seems still to assume 2 byte runes.
>
> --
> cinap

  reply	other threads:[~2023-12-01 12:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-29 10:47 Grimmware
2023-11-29 19:13 ` cinap_lenrek
2023-12-01 12:32   ` Grimmware [this message]
2023-12-01 16:37     ` cinap_lenrek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=963d0ca4-518a-40a1-b95a-bc96ed9595a6@app.fastmail.com \
    --to=oholiab@grimmwa.re \
    --cc=9front@9front.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).