-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 2014-10-20 17:14, schrieb Jonathan Vollebregt:
I could assign it at the start of the reg_add function but that seems a bit out of place and since the REG_BINARY tests reuse the buffer it's easier to have it non-const.
However, this did give me the idea of using:
memcpy(buffer, "three\0little\0strings\0", 22); That would work. IMHO using separate variables that are declared in a way that don't need magic sizes is nicer, but I'll leave this up to you. And I don't know what Alexandre prefers either way.
What about the following cases?
/s ABC /d threeABClittleABCstrings /s \\0 /d three\\0little\\0strings
If the separator is more than one character native reg returns 1, though I haven't tested for the second case. Afaics your tests don't distinguish between the case that the separator is more than one character and the case that the separator does not occur in the input value.
In other words, this needs another test: /s # /d onebigstring
todo_wine ok(r == REG_EXIT_FAILURE || broken(r == REG_EXIT_SUCCESS /* WinXP */), "got exit code %u, expected %u\n", r, REG_EXIT_SUCCESS);
I'll change my patches to this. Should I expand the commit to change the existing tests as well? Yes please.
Thanks again for your work! Stefan -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJURSkTAAoJEN0/YqbEcdMwVMoP/0gbpxwXp+bWlYxLp0yGX1W2 1yYMxEh092R7izh3XZ2pOLNvcX6snHSwlYbVz6VTGr2P1NHBg7hJAwwvCl849wYG IHKpzUT9C1lFq3pRcb0U24pyvpD+Puh1icPTIoilXv5BNJtM0MdtQH5KEo7Oph+k dDApEPH6uGB/3n29UO1KKGUO5pkpWMjq4hQHYbGFLrn+93VzPxW7oJHA88yl3vEt vIpO01v7+TT+e2Hi6qicLneu/sP3b10mT0Ce98euaaoUSN7BiLm32AL3jusCoRrZ zLXSluSR6cus6lcQ9iukiVIdMLywRIlReco0t5aGTrenPFFhoSh6CsyH9ADszDKL rel87y2gz9IPhYBMAZw7E6yhzvG76QSEg9Rmjz6NjlOKEl5auwYIm4nkcbbP3io6 JPxD6yP/tlbLvSmGHthe0uLtSrC2PxTsoa6UGGCYltOVbw75I3T7fODr/AR3FXOR zr2DdteVNkBALVLMkNC0lb7/U4pqxw9PIaMA+lrIo4SXqyQi8ASJGmZGX4mNr7k/ 0FnXFt6SEoAKd5NZTtbPV1wnPPCktmXuP3Jb3EMVrtQptStATcbSr5BzEI6hj6vG hc1+8J/gpHFr5yVx7DGS0bU5xe3AeQNbNSZ2hQjQqQYRQi9bXNny9xn3O6bWJvo1 HWcNdAKQqrwYDrFGr4Dc =XBnk -----END PGP SIGNATURE-----