A wire electrical discharge machine that machines a workpiece using a wire electrode, the wire electrical discharge machine comprising: a drive control unit configured to move the wire electrode relative to the workpiece along a machining path set in a machining program; a path determination unit configured to determine whether or not the machining path includes a linear path section (78, 80) that crosses a boundary line between a thick portion of the workpiece and a thin portion of the workpiece, a thickness of the thin portion being smaller than a thickness of the thick portion in an extending direction of the wire electrode; characterized by a path compensator configured to compensate the machining path so as to form, in the thin portion over a predetermined distance, a protrusion (74, 74') projecting in an outward direction from the boundary line when the path determination unit determines that the linear path section is included, wherein the outward direction is orthogonal to both the direction of the machining path and the extending direction of the wire electrode and goes toward a nearest endface of the workpiece, wherein the machining on the workpiece includes a plurality of machining steps that perform electrical discharge machining while moving the wire electrode relative to the workpiece along the machining path; and the drive control unit is configured to: move, not according to the machining program, the wire electrode relative to the workpiece along the machining path compensated by the path compensator up to a predetermined machining step among the plurality of machining steps, and move, according to the machining program, the wire electrode relative to the workpiece along the machining path before being compensated by the path compensator, in the machining steps after the predetermined machining step. a drive control unit configured to move the wire electrode relative to the workpiece along a machining path set in a machining program; a path determination unit configured to determine whether or not the machining path includes a linear path section (78, 80) that crosses a boundary line between a thick portion of the workpiece and a thin portion of the workpiece, a thickness of the thin portion being smaller than a thickness of the thick portion in an extending direction of the wire electrode; characterized by a path compensator configured to compensate the machining path so as to form, in the thin portion over a predetermined distance, a protrusion (74, 74') projecting in an outward direction from the boundary line when the path determination unit determines that the linear path section is included, wherein the outward direction is orthogonal to both the direction of the machining path and the extending direction of the wire electrode and goes toward a nearest endface of the workpiece, the machining on the workpiece includes a plurality of machining steps that perform electrical discharge machining while moving the wire electrode relative to the workpiece along the machining path; and the drive control unit is configured to: move, not according to the machining program, the wire electrode relative to the workpiece along the machining path compensated by the path compensator up to a predetermined machining step among the plurality of machining steps, and move, according to the machining program, the wire electrode relative to the workpiece along the machining path before being compensated by the path compensator, in the machining steps after the predetermined machining step. move, not according to the machining program, the wire electrode relative to the workpiece along the machining path compensated by the path compensator up to a predetermined machining step among the plurality of machining steps, and move, according to the machining program, the wire electrode relative to the workpiece along the machining path before being compensated by the path compensator, in the machining steps after the predetermined machining step.