The code wrongly assumed memcmp did not read past the mismatch.
Reviewed-on: https://github.com/dlang/dmd/pull/12247
gcc/d/ChangeLog:
PR d/99337
* dmd/MERGE: Merge upstream dmd
a3c9bf422.
-7132b3537dc27cb353da75798082ffe7ea3d69a6
+a3c9bf422e7ff54d45846b8c577ee82da4234db1
The first line of this file holds the git revision number of the last
merge done from the dlang/dmd repository.
const char *m = (*ms)[j];
const char *q = strchr(m, '=');
assert(q);
- if (dotmods->length() <= (size_t)(q - m) && memcmp(dotmods->peekChars(), m, q - m) == 0)
+ if (dotmods->length() == (size_t)(q - m) && memcmp(dotmods->peekChars(), m, q - m) == 0)
{
buf->reset();
size_t qlen = strlen(q + 1);