Detlef Riekenberg wine.dev@web.de writes:
- len = sizeof(buffer);
- res = SHRegGetUSValueA(regpath, name, NULL, buffer, &len, FALSE, NULL, 0);
- if (!res) {
lstrcpynA(out, buffer, outlen);
if (outlen > 0) {
out[min(outlen-1,len)] = '\0';
}
This doesn't look right. Why do you even need a separate buffer?