In msvs.py, _EscapeCommandLineArgumentForMSBuild() is dividing by 2: return (len(match.group(1)) / 2 * 4) * "\\" + '\\"', however this division results in a float, which causes the multiplication by the string "\\" to throw this error. To fix this, I believe that the division should be changed to use floor division (//), which should correctly return an integer: return (len(match.group(1)) // 2 * 4) * "\\" + '\\"'
This issue causes problems when a define in GYP has backslashes that need to be escaped. For example:
"defines": [
"TEST_STRING=\\\"TEST\\\"",
]
In msvs.py,
_EscapeCommandLineArgumentForMSBuild()is dividing by 2:return (len(match.group(1)) / 2 * 4) * "\\" + '\\"', however this division results in a float, which causes the multiplication by the string"\\"to throw this error. To fix this, I believe that the division should be changed to use floor division (//), which should correctly return an integer:return (len(match.group(1)) // 2 * 4) * "\\" + '\\"'This issue causes problems when a define in GYP has backslashes that need to be escaped. For example: