mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-19 20:23:54 +00:00
Use std::vector::data method to avoid reference binding to null pointer
This commit is contained in:
parent
cc9a6bfcdd
commit
c91deaf7af
1 changed files with 2 additions and 2 deletions
|
@ -104,7 +104,7 @@ namespace ESM
|
||||||
}
|
}
|
||||||
|
|
||||||
mScriptData.resize(subSize);
|
mScriptData.resize(subSize);
|
||||||
esm.getExact(&mScriptData[0], mScriptData.size());
|
esm.getExact(mScriptData.data(), mScriptData.size());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ESM::FourCC<'S','C','T','X'>::value:
|
case ESM::FourCC<'S','C','T','X'>::value:
|
||||||
|
@ -156,7 +156,7 @@ namespace ESM
|
||||||
}
|
}
|
||||||
|
|
||||||
esm.startSubRecord("SCDT");
|
esm.startSubRecord("SCDT");
|
||||||
esm.write(reinterpret_cast<const char * >(&mScriptData[0]), mData.mScriptDataSize);
|
esm.write(reinterpret_cast<const char *>(mScriptData.data()), mData.mScriptDataSize);
|
||||||
esm.endRecord("SCDT");
|
esm.endRecord("SCDT");
|
||||||
|
|
||||||
esm.writeHNOString("SCTX", mScriptText);
|
esm.writeHNOString("SCTX", mScriptText);
|
||||||
|
|
Loading…
Reference in a new issue