Method for operating an internal combustion engine comprising - a combustion unit having at least one combustion chamber, - a fresh gas system, - an exhaust gas system having an exhaust gas sensor integrated therein, and - a fuel tank system, wherein the fuel tank system has - a fuel tank, - a fuel vapor filter which is connected to a surroundings opening in a fluid-conducting manner, - a vent line leading from the fuel tank to the fuel vapor filter, and - a purge gas line leading from the fuel vapor filter to the fresh gas system, in which - a HC sensor and - a tank vent valve and/or a purge gas conveying device are integrated, wherein during operation of the internal combustion engine, when purge gas is conducted via the purge gas line, - the hydrocarbon content of the purge gas is determined by means of the HC sensor, as well as the mass flow of the purge gas, and, from these values in combination, a fuel mass flow which is introduced into the fresh gas system is determined, and - an amount of fuel introduced into the combustion chamber and/or into the fresh gas system by means of at least one fuel injector is adjusted, wherein the air-fuel equivalence ratio of fuel-fresh gas mixture amounts which are supplied to the combustion chamber is monitored, with respect to a deviation from a target value, from an exhaust gas composition determined by means of the exhaust gas sensor, characterized in that when such a deviation is determined, a correction of the measured value of the HC sensor or the fuel mass flow determined therefrom is carried out, or the HC sensor is determined to be defective, wherein a correction of the measurement signal from the HC sensor or of the fuel mass flow determined therefrom is carried out if the deviation is below a threshold value or corresponds to this threshold value, and the HC sensor is determined to be defective if the deviation is above a or the threshold value. - a combustion unit having at least one combustion chamber, - a fresh gas system, - an exhaust gas system having an exhaust gas sensor integrated therein, and - a fuel tank system, wherein the fuel tank system has - a fuel tank, - a fuel vapor filter which is connected to a surroundings opening in a fluid-conducting manner, - a vent line leading from the fuel tank to the fuel vapor filter, and - a purge gas line leading from the fuel vapor filter to the fresh gas system, in which - a HC sensor and - a tank vent valve and/or a purge gas conveying device are integrated, - a fuel tank, - a fuel vapor filter which is connected to a surroundings opening in a fluid-conducting manner, - a vent line leading from the fuel tank to the fuel vapor filter, and - a purge gas line leading from the fuel vapor filter to the fresh gas system, in which - a HC sensor and - a tank vent valve and/or a purge gas conveying device are integrated, wherein during operation of the internal combustion engine, when purge gas is conducted via the purge gas line, - the hydrocarbon content of the purge gas is determined by means of the HC sensor, as well as the mass flow of the purge gas, and, from these values in combination, a fuel mass flow which is introduced into the fresh gas system is determined, and - an amount of fuel introduced into the combustion chamber and/or into the fresh gas system by means of at least one fuel injector is adjusted, - the hydrocarbon content of the purge gas is determined by means of the HC sensor, as well as the mass flow of the purge gas, and, from these values in combination, a fuel mass flow which is introduced into the fresh gas system is determined, and - an amount of fuel introduced into the combustion chamber and/or into the fresh gas system by means of at least one fuel injector is adjusted, wherein the air-fuel equivalence ratio of fuel-fresh gas mixture amounts which are supplied to the combustion chamber is monitored, with respect to a deviation from a target value, from an exhaust gas composition determined by means of the exhaust gas sensor, characterized in that when such a deviation is determined, a correction of the measured value of the HC sensor or the fuel mass flow determined therefrom is carried out, or the HC sensor is determined to be defective, wherein a correction of the measurement signal from the HC sensor or of the fuel mass flow determined therefrom is carried out if the deviation is below a threshold value or corresponds to this threshold value, and the HC sensor is determined to be defective if the deviation is above a or the threshold value.