diff options
Diffstat (limited to 'src/cv2pdb.cpp')
-rw-r--r-- | src/cv2pdb.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cv2pdb.cpp b/src/cv2pdb.cpp index 8a94a58..4208f3f 100644 --- a/src/cv2pdb.cpp +++ b/src/cv2pdb.cpp @@ -340,9 +340,11 @@ static int copy_p2dsym(unsigned char* dp, int& dpos, const unsigned char* p, int {
const BYTE* q = p + pos;
int plen = pstrlen(q);
- int len = dsym2c(q, plen, (char*) dp + dpos, maxdlen - dpos);
+ int len = min(plen, maxdlen - dpos);
+ memcpy(dp + dpos, q, len);
+ dp[dpos + len] = 0;
dpos += len + 1;
- pos = q - p + len;
+ pos = q - p + plen;
return len;
}
|