mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
Added GetSourceAt() with code pos
This commit is contained in:
parent
dc028b87e4
commit
bb97ec8933
2 changed files with 13 additions and 1 deletions
|
@ -84,6 +84,17 @@ bool AbstractScript::GetSourceAt(size_t sourcePos, str *sourceLine, int& column,
|
|||
return true;
|
||||
}
|
||||
|
||||
bool AbstractScript::GetSourceAt(const unsigned char *sourcePos, str *sourceLine, int& column, int& line)
|
||||
{
|
||||
const sourceinfo_t *codePos = m_ProgToSource->findKeyValue(sourcePos);
|
||||
|
||||
if (!codePos) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return GetSourceAt(codePos->sourcePos, sourceLine, column, line);
|
||||
}
|
||||
|
||||
void AbstractScript::PrintSourcePos(sourceinfo_t *sourcePos, bool dev)
|
||||
{
|
||||
int line;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue