[NTOS:MM] kdbg.c: Fix Argv[n] copypastas (#4634)

This commit is contained in:
Serge Gautherie 2022-08-27 15:58:54 +02:00 committed by GitHub
parent ea2d32b9eb
commit 730b13daac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -60,17 +60,17 @@ ExpKdbgExtPool(
/* Get address */
if (!KdbpGetHexNumber(Argv[1], &Address))
{
KdbpPrint("Invalid parameter: %s\n", Argv[0]);
KdbpPrint("Invalid parameter: %s\n", Argv[1]);
return TRUE;
}
}
if (Argc > 2)
{
/* Get address */
if (!KdbpGetHexNumber(Argv[1], &Flags))
/* Get flags */
if (!KdbpGetHexNumber(Argv[2], &Flags))
{
KdbpPrint("Invalid parameter: %s\n", Argv[0]);
KdbpPrint("Invalid parameter: %s\n", Argv[2]);
return TRUE;
}
}
@ -185,14 +185,14 @@ ExpKdbgExtPoolUsed(
ExpKdbgExtPoolUsedGetTag(Argv[2], &Tag, &Mask);
if (!KdbpGetHexNumber(Argv[1], &Flags))
{
KdbpPrint("Invalid parameter: %s\n", Argv[0]);
KdbpPrint("Invalid parameter: %s\n", Argv[1]);
}
}
else
{
/* Otherwise, try to find out whether that's flags */
if (strlen(Argv[1]) == 1 ||
(strlen(Argv[1]) == 3 && Argv[1][0] == '0' && Argv[1][1] == 'x'))
(strlen(Argv[1]) == 3 && Argv[1][0] == '0' && (Argv[1][1] == 'x' || Argv[1][1] == 'X')))
{
/* Fallback: if reading flags failed, assume it's a tag */
if (!KdbpGetHexNumber(Argv[1], &Flags))
@ -568,7 +568,7 @@ ExpKdbgExtIrpFind(
{
if (!KdbpGetHexNumber(Argv[2], &FindCtxt.RestartAddress))
{
KdbpPrint("Invalid parameter: %s\n", Argv[0]);
KdbpPrint("Invalid parameter: %s\n", Argv[2]);
FindCtxt.RestartAddress = 0;
}
}