Commit f90f6616 authored by Alan Hourihane's avatar Alan Hourihane

Copy mode strings upon mode copy

parent 8fced5b6
......@@ -407,6 +407,7 @@ CheckMode(ScrnInfoPtr pScrn, vbeInfoPtr pVbe, VbeInfoBlock *vbe, int id,
if (p) {
pMode = xnfcalloc(sizeof(DisplayModeRec), 1);
memcpy((char*)pMode,(char*)p,sizeof(DisplayModeRec));
pMode->name = xnfstrdup(p->name);
}
}
......@@ -438,6 +439,7 @@ CheckMode(ScrnInfoPtr pScrn, vbeInfoPtr pVbe, VbeInfoBlock *vbe, int id,
if (newMode) {
pMode = xnfcalloc(sizeof(DisplayModeRec), 1);
memcpy((char*)pMode,(char*)newMode,sizeof(DisplayModeRec));
pMode->name = xnfstrdup(newMode->name);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment