The phase-generated carrier (PGC) algorithm is one of the most commonly employed demodulation schemes in optical fiber sensors. It exhibits high sensitivity in detecting weak signal and is less susceptible to fluctuations in light source intensity. However, the inevitable uneven frequency response of photoelectric detection will lead to distortion in the harmonic amplitudes, subsequently resulting in demodulation errors in the PGC scheme. This significantly jeopardizes the precision and accuracy of optical fiber sensors. This paper analyzes the demodulation errors in the PGC algorithm caused by non-uniform frequency response and proposes a correction method. In this method, only a correction factor is introduced in the final step of the PGC algorithm, without introducing additional complex computations. In comparison to conventional correction algorithms such as linear regression, function fitting, and neural networks, this method is simple, effective, and resource-friendly for DSP systems with limited resources. Experimental validation of this method is conducted using a fiber optic gyroscope prototype. The results demonstrate a remarkable reduction of 33-fold in demodulation error within the measurement range of -6 to +6 radian, reducing it from 610 parts per million (ppm) to a mere 18.3 ppm.