]> git.pld-linux.org Git - packages/f-spot.git/blob - f-spot-taglib.patch
- rel 3
[packages/f-spot.git] / f-spot-taglib.patch
1 From c1ef435b47a111046b86a5df33d98829762dc3ab Mon Sep 17 00:00:00 2001
2 From: Marek Habersack <grendel@twistedcode.net>
3 Date: Wed, 15 Sep 2010 23:18:08 +0200
4 Subject: [PATCH] All fields of a struct must be initialized before the constructor returns
5
6 ---
7  src/TagLib/IFD/Entries/Rational.cs  |    6 ++++--
8  src/TagLib/IFD/Entries/SRational.cs |    6 ++++--
9  2 files changed, 8 insertions(+), 4 deletions(-)
10
11 diff --git a/src/TagLib/IFD/Entries/Rational.cs b/src/TagLib/IFD/Entries/Rational.cs
12 index e8a69c5..2113a9a 100644
13 --- f-spot-0.8.0/lib/TagLib/TagLib/src/TagLib/IFD/Entries/Rational.cs~
14 +++ f-spot-0.8.0/lib/TagLib/TagLib/src/TagLib/IFD/Entries/Rational.cs
15 @@ -62,8 +62,10 @@ namespace TagLib.IFD.Entries
16                 /// </param>
17                 public Rational (uint numerator, uint denominator)
18                 {
19 -                       Numerator = numerator;
20 -                       Denominator = denominator;
21 +                       if (denominator == 0)
22 +                               throw new ArgumentException ("denominator");
23 +                       this.numerator = numerator;
24 +                       this.denominator = denominator;
25                 }
26  
27  #endregion
28 diff --git a/src/TagLib/IFD/Entries/SRational.cs b/src/TagLib/IFD/Entries/SRational.cs
29 index f80dee8..59ca58a 100644
30 --- f-spot-0.8.0/lib/TagLib/TagLib/src/TagLib/IFD/Entries/SRational.cs~
31 +++ f-spot-0.8.0/lib/TagLib/TagLib/src/TagLib/IFD/Entries/SRational.cs
32 @@ -62,8 +62,10 @@ namespace TagLib.IFD.Entries
33                 /// </param>
34                 public SRational (int numerator, int denominator)
35                 {
36 -                       Numerator = numerator;
37 -                       Denominator = denominator;
38 +                       if (denominator == 0)
39 +                               throw new ArgumentException ("denominator");
40 +                       this.numerator = numerator;
41 +                       this.denominator = denominator;
42                 }
43  
44  #endregion
45 -- 
46 1.7.2.3
47
This page took 0.098322 seconds and 3 git commands to generate.